XPath Tester
Test XPath expressions against XML documents — see matched nodes instantly
XML Input
Results (0)
XPath Tester
Test XPath expressions against XML documents — see matched nodes instantly
Features
- Evaluate XPath expressions against any XML document
- Display matched elements, attributes, and text nodes
- Show node type and index for each result
- Full serialization of matched element nodes
- Keyboard shortcut — press Enter to evaluate
- 100% client-side — no data sent to servers
How to use
- Paste your XML document in the left panel.
- Enter an XPath expression in the input field.
- Click Evaluate or press Enter to see results.
- Copy matched nodes using the Copy button.
Tips & Best Practices
- Use // to search anywhere in the document (e.g., //title).
- Use [@attr='value'] to filter by attributes.
- Use text() to extract only the text content of elements.
- Try the example to see XPath in action with a bookstore XML.
FAQ
What is XPath?
XPath (XML Path Language) is a query language for selecting nodes from XML documents. It uses path expressions to navigate elements, attributes, and text.
What XPath functions are supported?
All standard XPath 1.0 functions are supported, including text(), contains(), starts-with(), position(), count(), and more.
Is my data private?
Yes, all evaluation happens in your browser using the native DOMParser and XPath APIs. No XML data is sent to any server.