XML Toolbox
XML to JSON
Turn XML into JSON
Example Usage
Here’s how to convert XML data into JSON using some sample XML:
<library>
<book>
<title>The Great Gatsby</title>
<author>F. Scott Fitzgerald</author>
<year>1925</year>
<genre>Fiction</genre>
</book>
<book>
<title>To Kill a Mockingbird</title>
<author>Harper Lee</author>
<year>1960</year>
<genre>Fiction</genre>
</book>
</library>=>{{ XMLtoJSON }}=>{{ variable | name: "jsonOutput" }}
<< name: jsonOutput, prompt: false >>
JSON to XML
Turn JSON to XML
Example Usage
Here’s how to convert JSON data into XML using some sample JSON:
{
"library": {
"book": [
{
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"year": "1925",
"genre": "Fiction"
},
{
"title": "To Kill a Mockingbird",
"author": "Harper Lee",
"year": "1960",
"genre": "Fiction"
}
]
}
}=>{{ JSONtoXML }}=>{{ variable | name: "xmlOutput" }}
<< name: xmlOutput, prompt: false >>
Note
Using these transformations allows for easy data format conversions within mAIstro, enabling smooth data handling across applications. Make sure that the input format aligns with expected syntax to avoid conversion errors.