{
  "slug": "xpath-query",
  "name": "gizza-ai/xpath-query",
  "version": "0.1.0",
  "title": "XPath Query — Evaluate XPath 1.0 on XML/XHTML — gizza.ai",
  "description": "Run an XPath 1.0 expression against XML or XHTML and return matching node values or serialized XML. Local browser WebAssembly tool.",
  "tags": [
    "xpath",
    "xpath query",
    "xml xpath",
    "xhtml xpath",
    "xml query",
    "xpath tester",
    "xpath evaluator"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/xpath-query/",
    "markdown": "https://gizza.ai/tools/xpath-query/index.md",
    "descriptor": "https://gizza.ai/tools/xpath-query/tool.json",
    "deep_link_example": "https://gizza.ai/tools/xpath-query/?expression=%2F%2Fbook%2Ftitle%20or%20count%28%2F%2Fitem%29&xml=%3Ccatalog%3E%3Cbook%20id%3D%22b1%22%3E%3Ctitle%3ERust%3C%2Ftitle%3E%3C%2Fbook%3E%3C%2Fcatalog%3E&output=value"
  },
  "cli": "gizza tool xpath-query \"//book/title or count(//item)\" 'xml=<catalog><book id=\"b1\"><title>Rust</title></book></catalog>'",
  "tool": {
    "description": "Evaluate an XPath 1.0 expression against an XML or XHTML document and return matching nodes or values. Supports XPath 1.0 location paths, attributes, predicates, functions, scalar results, and node-set output as string values or serialized XML.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "expression": {
          "description": "The XPath 1.0 expression, e.g. '//book/title', '//a/@href', or 'count(//item)'.",
          "type": "string"
        },
        "output": {
          "default": "value",
          "description": "What to return for each matched node: value = its string value; xml = serialized outer XML.",
          "enum": [
            "value",
            "xml"
          ],
          "type": "string"
        },
        "xml": {
          "description": "The XML or XHTML document to query.",
          "type": "string"
        }
      },
      "required": [
        "expression",
        "xml"
      ],
      "type": "object"
    }
  }
}