Mapping rules
| XML | JSON |
|---|---|
<name>Ada</name> | "name": "Ada" |
Attribute id="7" | "@id": "7" |
Repeated <item> siblings | An array "item": [ … ] |
| Text next to child elements or attributes | "#text": "…" |
XML has no types, so every value stays a string. A single child is an object, but two of the same name become an array. If your code needs a consistent array, check for both.
The reverse button turns JSON into XML using the same conventions, so a round trip gives you back the same structure.