XML to JSON
What this does
Parses XML and produces JSON. Elements become keys, repeated elements become arrays, attributes are kept under a prefixed key (@name), and text content under #text when an element has both.
When to use it
- Working with an XML API in a JavaScript or Python project.
- Reading an RSS feed or a sitemap as data.
Good to know
XML has no lists or types, so a single child and a repeated child look different in the output. Check the array option if you need consistency.