XML to JSON Converter
xml_to_jsonConvert XML to JSON. Attributes become "@name", text beside attributes or child elements becomes "#text", repeated elements become arrays, CDATA is text and comments are dropped.
Returns: Object with json: the converted value, keyed by the root element name.
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": {
"input": "<input>"
},
"name": "xml_to_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | XML text. | |
| coerce | No | Turn numbers and true/false into JSON numbers and booleans (values with leading zeros stay text). |