Dev Tools

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
<?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>
Error
DOMParser is not defined
Was this page helpful?

Related tools