XPath Tester

Test XPath expressions against XML or HTML and inspect every matching node, value and path.

Input type
XML / HTML input
Enter XML or HTML and an XPath expression to test.

Your XML, HTML and XPath are tested in your browser. Nothing is uploaded to BroBroGo.

FAQ

Can I test XPath on HTML as well as XML?

Yes. XML mode keeps XML namespace rules. HTML mode is forgiving and lets simple paths like //a match normal tags.

How do XML namespaces work?

Namespace prefixes declared in your XML can be used in the XPath, such as //x:item. For default namespaces, //item also follows the document declaration.

Why can a query time out?

Very large documents or broad expressions can be expensive to evaluate. The tool stops a run after 2 seconds so the page stays responsive; narrow the path or try a smaller sample.