An xml element is an unordered set of attribute names, and their associated values.
<div class="title" id="heading" lang="en"> </div>
a JSON object is an unordered set of attribute names, and their associated values.
{"tagName":"div", "className":"title", "id":"heading", "lang":"en"}
an xml element may contain an ordered tuple of "nodes", which may be plain text nodes, or could be other xml elements.
<div class="title" id="heading" lang="en">
The Grand Adventure of <i>Lucious Swan:</i> The return of elemental qualities.
</div>
a json property may contain an ordered tuple of values, which may be primatives, or could be other objects.
{"tagName":"div", "className":"title", "id":"heading",
"lang":"en",
childNodes:[
"The Grand Adventure of ",
{tagName:"i", childNodes:["Lucious Swan:"]},
" The return of elemental qualities."
]
}
and that's basically all there is to it. This may appear somewhat more bulky than other xml to json translations. However, the translation preserves the unique and unordered quality of xml attributes, and the ordered non-unique quality of xml node collections. As a result, it's much simpler to implement readers and writers for this format, because there's fewer exceptions or other special conditions to account for. This is more or less a direct translation of the semantics of xml into JSON.
As an additional bonus, code written against this style of structure would work exactly the same directly against a browser dom representation of an xml document, since this is essentially a stripped down subset of the browser DOM, using the same attribute names. Most server-side XML parsers produce essentially the same structure as well.
a JSON translation into xml, using the same principles however, is not so easy...