XPath Tester
Test XPath expressions against your XML in seconds. Paste XML on the left, type an XPath expression, and every matching node appears below with its path and value — all processed in your browser, nothing is uploaded.
Your XML
XPath expression
Press Test or hit Enter. The expression is evaluated live as you type after a short pause.
Matches 0
| # | Node path | Value |
|---|
Run a test to see matching nodes here.
How to use
- Paste your XML document into the box, or press Load sample XML to try the demo.
- Type an XPath expression, for example
//book/title. - Press Test or wait a moment — matching nodes list with path and value.
- Try the quick example buttons to learn common expression patterns.
Note: XML with namespaces needs local-name() style expressions, since this tester does not resolve namespace prefixes.
Tips
- Use
//to search the whole document, for example//titlefinds every title anywhere. - Filters go in square brackets:
//book[price<20]keeps only cheap books. - Attributes use the at sign:
//book[@category]finds books that have a category attribute. text()selects the text inside an element;count(...)returns how many nodes match.
Frequently Asked Questions (FAQ)
What does this XPath tester do?
You paste any XML document and type an XPath expression. The tool lists every node that matches, with its path and value, so you can check your expression quickly.
Is my XML uploaded to a server?
No. Your XML is parsed and evaluated inside your own browser only. Nothing leaves your device.
What if my XPath expression has a mistake?
The tool shows a clear error message explaining the problem, such as an invalid expression or an XML parsing error, so you can fix it.
Does it support XML namespaces?
Only partly. Namespace prefixes are not resolved, so use local-name() style expressions for namespaced XML.
Do I have to press Test after every change?
No. The expression is also evaluated live as you type, after a short pause.