Overview
Paste XML, write an XPath expression, and see exactly which nodes match - powered by document.evaluate(), the standard XPath 1.0 engine every browser already ships, not a reimplementation. Element matches are serialized back to readable XML text; attribute or text-node matches show their value directly. Invalid XPath syntax is caught and reported as a clear error rather than crashing the page, and a query with no matches is reported honestly instead of silently showing nothing. Runs entirely client-side, including the underlying DOMParser step, which never resolves external entities or DTDs.
Best for: Working out the right XPath expression before hardcoding it into a scraper or XSLT
How to use this tool
- Paste your XML. Any well-formed document you want to query against.
- Write an XPath expression. Element selection, attribute predicates like @id, text(), and more.
- document.evaluate() runs it. The browser’s built-in XPath 1.0 engine evaluates the expression against the parsed document.
- See matched nodes as text. Matches are serialized back to XML (or shown as text) - never rendered as raw HTML.
Why use this tool
Native engine, no reimplementation
Uses document.evaluate() - the same XPath engine your browser already uses for anything else that needs one.
Clear error handling
Invalid XPath syntax is caught and shown as a message instead of crashing.
Safe node rendering
Matched nodes are serialized to text via XMLSerializer, never injected as HTML.
No external entity resolution
The underlying DOMParser is a browser platform guarantee against XXE - it never fetches external entities or DTDs.
Frequently asked questions
Whatever document.evaluate() supports in your browser, which is XPath 1.0 - the standard supported natively across browsers. It covers the common cases: element/attribute selection, predicates like [@id='2'], text(), and axis navigation.
document.evaluate() throws a DOMException for invalid syntax, and this tool catches that exception and shows its message directly rather than letting it crash the page or silently returning nothing.
No - the XML Parser renders the whole document as a browsable tree. This tool answers a narrower question: which specific nodes match a given XPath expression, which is a different (and often faster) way to explore or debug a large document.