XPath Tester
Test XPath expressions against XML in your browser. Enter an expression and sample XML to inspect matching nodes quickly.
This page uses the current XPath tool interface and is intended for developers working with XML documents, feeds, APIs, and automated tests.
Use the examples on this page to test XPath syntax, XML paths, attributes, and nested selections without relying on a query-string URL.
How to use an XPath tester
Start with a small XML example and an expression such as //book/title. Check whether the result selects the nodes you expect, then expand the expression for attributes, nested elements, or conditions. Testing a small sample makes syntax mistakes easier to isolate before you apply an XPath query to a larger document.
XPath is useful for XML parsing, web automation, document transformations, and data extraction. Keep expressions readable, verify namespaces when a document uses them, and compare the selected nodes with the original XML before using the query in production code.