XPath Tester
Test XPath 1.0 expressions against pasted XML in your browser. Map namespace prefixes, see the result type, node count, node paths and selected XML or text — with unsafe XML refused before parsing.
Test XPath 1.0 expressions against pasted XML in your browser. Map namespace prefixes, see the result type, node count, node paths and selected XML or text — with unsafe XML refused before parsing.
XPath Tester evaluates XPath 1.0 expressions against XML you paste. The XML is parsed into a separate in-memory document by the browser’s XML parser and queried with the browser’s own XPath engine — it is never added to the page. You see the result type (node-set, string, number or boolean), the number of matching nodes, each node’s kind and path, and the selected XML or text, which you can copy or download.
For namespaced XML, add prefix and URI rows and use the prefixes in your expression; XPath 1.0 has no default namespace, so even a default xmlns needs a prefix. DOCTYPE declarations, entity declarations and processing instructions are refused before parsing, and size, depth, element and result limits keep large documents manageable. The tool works only on pasted XML: it cannot fetch or test a live web page or XML endpoint.
XPath 1.0, as provided by your browser. XPath 2.0 and 3.1 functions and types are not available.
XPath 1.0 cannot use a default namespace directly. Add a row mapping a prefix such as a to the namespace URI, then write //a:item instead of //item.
No. It only queries the XML you paste. Nothing is fetched from the internet.
DOCTYPE and entity declarations and processing instructions are refused for safety, and malformed XML reports the line and column of the problem. Remove the DOCTYPE line and try again.
A node-set (elements, attributes, text or comments), or a single string, number or boolean from expressions such as string(//title), count(//item) or boolean(//error).
Up to 2 MB of XML, 100,000 elements, 256 levels of nesting, 1,000-character expressions and the first 1,000 matching nodes.
No. Everything is processed in your browser on your device. Nothing is uploaded, no request is sent, and inputs and results are not saved in browser storage. Reset clears them from the page.