XML XPath query
xml_queryRun XPath 1.0 queries on XML to extract matching nodes, attributes, text, numbers, strings, or booleans, with namespace support and optional result limits.
Instructions
Run an XPath 1.0 expression on XML: node-sets (elements, attributes, text…), numbers (count(), sum()), strings and booleans. Full XPath 1.0: all axes, predicates, operators and the core function library. Namespace prefixes declared anywhere in the document can be used as-is; a default namespace on the root gets the prefix "d" (e.g. //d:book), as on the website. Each matched node comes back as XML text plus its type, name and XPath location. Web version: https://s3eidat.github.io/xml-format/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Or: a path to a XML file (UTF-8; use this for big inputs). | |
| text | No | The XML as inline text. | |
| limit | No | Return at most this many nodes (default 1000). | |
| xpath | Yes | XPath 1.0 expression, e.g. "//book[price > 30]/title", "count(//item)", "//d:entry/@id". | |
| namespaces | No | Extra or overriding prefix → namespace URI bindings, e.g. {"atom":"http://www.w3.org/2005/Atom"}. |