Evaluates an XPath expression against XML.
This XPath tester runs an XPath expression against an XML document and shows the matching result instantly in your browser. Enter your XML on the left, type an XPath query in the toolbar, and the tool prints matched text, attribute values, serialized element markup, or the result of an XPath function such as count() or string(). It's useful whenever you need to write, debug, or verify an XPath selector without setting up a script or parser.
No. The XML is parsed and the XPath expression is evaluated entirely in your browser with JavaScript, so nothing you enter is uploaded or stored anywhere.
It handles node-sets (text, attribute, and element nodes), as well as string, number, and boolean results from XPath functions. Multiple matched nodes are joined one per line, and element nodes are shown as their serialized XML.
If the expression returns an empty node-set, the tool shows "No matches." If you leave the XPath box blank, it shows a hint asking you to enter an expression.
An invalid XPath expression or malformed XML (for example empty input or unclosed tags) raises a parse error, which the tool surfaces so you can fix the query or document.
Yes. You can use functions like count(), string(), normalize-space(), and true(), along with positional predicates such as [1], and the result is converted to a readable string.