XPath Tester

Paste some XML, write an XPath expression and see what it selects.

How this is worked out

The expression is evaluated by your browser's own XPath engine (XPath 1.0) against the XML you paste. A path returns a list of nodes (elements, attributes or text); functions such as count(), sum() or contains() return a number, string or true/false. HTML that is not well-formed XML will not parse here: convert it to XHTML first or paste a fragment that closes every tag.

Frequently asked questions

XPath 2.0 or 3.0?

Browsers implement XPath 1.0 only, so functions added later (for example lower-case() or matches()) are not available.

Related tools: Xml Formatter Validator, Regex Tester, Json Formatter.

Something not working on this page? Tell me through the Contact page: that is how I find out what is broken and fix it.