xml_query
Extract specific data from large XML files using XPath 1.0 queries, efficiently searching elements, attributes, and text content without loading the entire file into memory.
Instructions
Query XML file using XPath expressions. Provides powerful search capabilities without reading the entire file into memory. Supports standard XPath 1.0 query syntax for finding elements, attributes, and text content. Requires maxBytes
parameter (default 10KB). Can be used to extract specific data from large XML files with precise queries. The path must be within allowed directories.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
includeAttributes | No | Whether to include attribute information in the results | |
maxBytes | Yes | Maximum bytes to read from the file. Must be a positive integer. Handler default: 10KB. | |
path | Yes | Path to the XML file to query | |
query | No | XPath query to execute against the XML file | |
structureOnly | No | If true, returns only tag names and structure instead of executing query |