Xml Xpath
xml_xpathRun XPath 1.0 queries over XML you supply (RSS/Atom, SOAP, sitemaps, SVG, config) or over HTML for scraping: returns matched elements/attributes/text with their paths, text, attributes and outer markup, or the number/string/boolean result of an expression. Namespaces are auto-registered (default namespace as prefix d). Safe parser: no network, no external entities, DTD entities rejected. POST JSON body {xml or html, xpath}. Price: $0.003 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/xml-xpath
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "xml_xpath"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | XML document | |
| html | No | HTML document (lenient parser), alternative to xml | |
| limit | No | ||
| xpath | No | XPath 1.0 expression | |
| xpaths | No | Several named expressions {"name": "xpath"} (max 20) | |
| outerXml | No | Include each element's markup (truncated to 2000 chars) | |
| namespaces | No | Extra prefix -> namespace URI bindings |