XPath Tester
Test XPath 1.0 expressions against XML documents. Paste XML, enter an XPath query, and see matching nodes highlighted in the results.
XPath expression
XML document
XML with highlights
0 matches ()<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="fiction">
<title lang="en">The Great Gatsby</title>
<author>F. Scott Fitzgerald</author>
<year>1925</year>
<price>10.99</price>
</book>
<book category="fiction">
<title lang="en">1984</title>
<author>George Orwell</author>
<year>1949</year>
<price>8.99</price>
</book>
<book category="non-fiction">
<title lang="en">Sapiens</title>
<author>Yuval Noah Harari</author>
<year>2011</year>
<price>14.99</price>
</book>
<book category="fiction">
<title lang="fr">Le Petit Prince</title>
<author>Antoine de Saint-Exupery</author>
<year>1943</year>
<price>7.99</price>
</book>
</bookstore>Matching nodes
0 results ()No matches found.
Was this page helpful?
Related tools
About XPath Tester
Test XPath expressions against your own XML or HTML and see the matching nodes instantly. Speeds up writing selectors for scraping and XML processing.
How to use
- Paste your XML or HTML.
- Enter an XPath expression.
- Review the matched nodes and refine the expression.
Frequently asked questions
- Does it support HTML as well as XML?
- Yes — you can evaluate XPath against HTML documents, which is handy for scraping.
- Which XPath version is supported?
- It uses the browser’s XPath engine, which supports XPath 1.0 expressions.