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.
Related tools
JSON to XML ConverterConverter
Convert JSON objects to well-formed XML with indentation and attribute mapping options.
XML FormatterConverter
Format and prettify XML locally in your browser.
XML MinifierConverter
Minify XML by removing unnecessary whitespace.
XML to JSON ConverterConverter
Convert XML to JSON and JSON to XML locally in your browser.
JSON to TypeScriptCode
Generate TypeScript interfaces or types from JSON input.
JSON to Go StructCode
Generate Go structs from JSON with proper json tags.
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.