How to use XML XPath Query Tester
- Paste XML without a document type or custom entities.
- Enter an XPath expression and any namespace mappings.
- Review the matched nodes or scalar value and their displayed paths.
Example: XML XPath Query Tester
<root><item>A</item><item>B</item></root> with /root/item.
Options
- Namespace prefixes
- Map the document namespace to a query prefix explicitly. An XML default namespace is not automatically used for unprefixed XPath names.
- Expression result
- Node selections list matched values and paths. count(), string() and boolean() return scalar values rather than node lists. The supported grammar is browser XPath 1.0.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
No matches can be a namespace problem
Check the root namespace and the prefix map before changing a query that unexpectedly returns nothing. A successful query selects information from the supplied document; it does not validate the document against a schema. DTDs and custom entities are refused, and no external documents are fetched. The export leaves the original XML unchanged.
Questions about XML XPath Query Tester
Why does an unprefixed path miss namespaced elements?
XPath 1.0 does not use the XML default namespace for unprefixed element names. Add a prefix mapping and use that prefix in the expression.
Can it evaluate count() or boolean()?
Yes. Native scalar expressions return a number, string or boolean rather than a node list.
Does it load external entities?
No. Inputs declaring a DTD or custom entity are refused; the tool never fetches XML from a URL.