About the XML to JSON
The XML is parsed with the browser's built-in DOMParser, so malformed input is rejected with the line and column of the problem instead of producing half a result. The root element becomes the single top-level key.
Conversion rules: attributes become keys prefixed with @ (<price currency="USD"> → "@currency": "USD"); an element that appears more than once under the same parent becomes an array; an element with only text becomes a string; when an element has both attributes or children and text, the text goes into #text. CDATA sections are read as text, and comments and processing instructions are dropped.
Note that a list with a single child is not an array, because XML alone cannot say it should be; check for that in your code. Detect numbers & booleans converts values such as 44.95 and true; turn it off to keep every value a string. Namespace prefixes stay in key names, e.g. soap:Body.
How to use it
- Paste XML or open an .xml file.
- Choose whether to detect numbers and booleans.
- Pick the JSON indentation.
- Copy the JSON or download it.