RevealTheme logo

XML-zu-JSON-Konverter

Konvertieren Sie XML-Dokumente in JSON. Attribute werden zu Schlüsseln mit @-Präfix; wiederholte Tags werden zu Arrays.

So verwenden Sie dieses Tool

  1. 1

    Paste or type your XML into the input box.

  2. 2

    Read the converted JSON in the output panel below, which updates as you type.

  3. 3

    If the XML is malformed, fix the error shown in red and the output will reappear.

  4. 4

    Select the JSON from the output panel to copy it into your project.

Was ist der XML-zu-JSON-Konverter?

Der Wechsel von XML zu JSON ist in einigen Aspekten verlustbehaftet: XML unterstützt Namensräume, Verarbeitungsanweisungen und CDATA-Abschnitte, die keine direkten Entsprechungen in JSON haben. Dieser Konverter bewältigt 90 % der Fälle: verschachtelte Elemente, Attribute (mit @-Präfix) und Textinhalt (#text). Für komplexes XML kann eine dedizierte Bibliothek erforderlich sein.

Häufige Anwendungsfälle

  • Inspect a SOAP or legacy XML API response as JSON before wiring it into a JavaScript front end.

  • Convert an RSS or Atom feed snippet into JSON to prototype a parser quickly.

  • Turn a config file or build manifest written in XML into JSON to eyeball its structure.

  • Pull values out of an XML sitemap or data export when a JSON shape is easier to traverse.

  • Teach or learn how attributes, repeated tags, and text nodes map between the two formats.

  • Sanity-check that a small XML payload is well-formed, since malformed input shows a parser error.

Häufig gestellte Fragen

Was ist das @-Präfix?
Attribute werden als @attributname gespeichert, um sie von Kindelementen mit demselben Namen zu unterscheiden.

Verwandte Tools