XPath Tester
Test XPath expressions against XML documents. Debug queries and extract data from XML structures.
Quick Examples
🔒 Privacy First: All XML processing happens directly in your browser using the native DOMParser. Your data
is never sent to any server.
About XPath Tester
This free online tool lets you test XPath expressions against XML documents. XPath (XML Path Language) is a query language for selecting nodes from XML documents.
XPath Syntax
/- Select from root//- Select anywhere in document.- Current node..- Parent node@- Select attribute*- Wildcard (any element)@*- Any attribute[n]- Position predicate (1-based)[@attr]- Has attribute[@attr='value']- Attribute equalstext()- Text content
XPath Functions
last()- Last position in contextposition()- Current positioncount()- Count nodescontains()- String containsstarts-with()- String starts withnot()- Boolean negation