UTILITIES NEWBIE

XML to ordered JSON tree

Inspect XML as an explicit JSON document tree that preserves element and mixed-content order.

Source

0 characters

Import a local UTF-8 file
Print and optional local draft

An explicit save stores only source text as plaintext in this browser on this device. Do not save secrets or use a shared device. Nothing is saved or loaded automatically.

No draft has been loaded.

Output

Worked input and output

Input

<note priority="high">Hello</note>

Output

{
  "type": "document",
  "children": [
    {
      "type": "element",
      "name": "note",
      "attributes": [
        {
          "name": "priority",
          "value": "high"
        }
      ],
      "children": [
        {
          "type": "text",
          "value": "Hello"
        }
      ]
    }
  ]
}

The attribute is an ordered attribute entry and Hello is a text child. SOAP, WSDL and RSS are treated as generic XML trees, not executed services or normalized feed models.