xml2json is an XSLT Stylesheet to transform arbitrary XML to a JSON representation
This projects aims to produce JSON documents from arbitrary, well-formed XML documents.
Added support for elements with multiple children text nodes. Text nodes are now named $text1, $text2, etc if more than one sibling text node is present.
Added support for same name, ungrouped elements. Ungrouped sibling elements with the same name are converted into JSON objects with an appended number representing their index (starting with 1). This allows the transformation to preserve the original structure of the document without any data loss.
Example:
<an-element />
<tag>a</tag>
<tag>b</tag>
<tag>c</tag>
<another-element />
is converted to
...
{"tag1":{"$text":"a"}},
{"tag2":{"$text":"b"}},
{"tag3":{"$text":"c"}}
...
First functioning version of the stylesheet, with support for text processing as strings or numbers, arrays, and special characters escaping (\ and ")