How XML is mapped to JSON
The root element becomes the only key of the result. An element that only contains text becomes a simple value, so <name>Alex</name> turns into "name": "Alex". Attributes are written with a prefix, @id by default, and when an element has both attributes and text, the text is stored under #text. Elements with the same name next to each other become an array. CDATA sections are read as text, comments and processing instructions are left out.
With number and boolean detection on, values like 89.90 and true become real JSON types. Codes with a leading zero, such as barcodes or postal codes, and numbers longer than 15 digits stay text, so nothing is lost. Note that an element that appears once is not an array; if your code always expects a list, check for that case.
About XML
XML (Extensible Markup Language) stores data in nested elements with opening and closing tags, and can add attributes to each element. It is common in feeds, e-invoices, Office files and SOAP services.
About JSON
JSON (JavaScript Object Notation) writes data as objects in curly braces, lists in square brackets, text in double quotes, numbers, true, false and null. Almost every API and programming language reads it.