XPath Tester
Evaluate XPath 1.0 against XML in your browser.
XML and XPath
XPath results
Evaluate an expression to see matching nodes or values.
Worked examples
Load the sample and evaluate //book to list two elements, //book/@id for their IDs, or count(//book) for the number 2. Use boolean(//book) to test for a match.
Namespaces and supported files
For a default namespace, assign it a prefix such as item=urn:catalog and use //item:book. XML and queries stay in the browser. DTDs, entities and stylesheets are unsupported. See XML Formatter to format the source.