xml_to_json
Convert XML content into JSON objects, preserving attributes, namespaces, CDATA, and nested elements for parsing RSS feeds, SOAP responses, and legacy XML data.
Instructions
Convert XML content to a JSON object. Handles attributes, namespaces, CDATA sections, and nested elements. Useful for parsing RSS feeds, SOAP responses, and legacy XML data.
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": "<xml>"
},
"name": "xml_to_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | XML content to convert | |
| pretty | No | Pretty-print JSON output (default: true) | |
| preserve_attributes | No | Include XML attributes prefixed with @ (default: true) |