100% Private

XPath Tester

Test XPath expressions against XML documents. See matching nodes instantly, debug queries, and learn XPath syntax with examples.

0 matches
Enter an XPath expression and XML to see results
XPath Quick Reference
//elementSelect all elements with that name
/path/to/nodeAbsolute path from root
//node[@attr]Nodes with attribute
//node[@attr='value']Nodes with attribute value
//node[n]Nth node (1-indexed)
//node/text()Text content of nodes
//@attrSelect attributes
//node[child>n]Nodes where child > value
//node[contains(x,'y')]Contains function
//node[last()]Last node

Related Tools

View all Xml validators →

Privacy Notice: This site works entirely in your browser. We don't collect or store your data. Optional analytics help us improve the site. You can deny without affecting functionality.