xml_xml_to_dict
Convert XML documents to nested Python dictionaries returned as JSON. Handles attributes with '@' prefix, text content with '#text', and repeated tags as lists.
Instructions
[xml] Convert an XML document to a nested Python dict (returned as JSON). Attributes use @ prefix, text content uses #text when mixed with children. Repeated tags become lists.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"xml_string": "<xml_string>"
},
"name": "xml_xml_to_dict"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml_string | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |