Hi Folks,
A colleague pointed me to an XML-to-JSON tool:
There are a bunch of free tools online that already do
this - the most frequent one I see cited is this one, which
states some principles (and provides configurable options)
for how to do the translation.
http://www.freeformatter.com/xml-to-json-converter.html
I checked out the tool - nice!
For example, it converts this:
<Book id="MCD">
<Title>Modern Compiler Design</Title>
<Author>Dick Grune</Author>
<Publisher>Springer</Publisher>
</Book>
to this:
{
"@id": "MCD",
"Title": "Modern Compiler Design",
"Author": "Dick Grune",
"Publisher": "Springer"
}
I like that it encodes XML attributes by prefixing the attribute name with the @ symbol.
/Roger