- Esecutori
-
Impara
Centro di apprendimento Python Esempi eseguibili, NumPy, pandas e altro Centro di apprendimento C e C++ Puntatori, memoria, STL e C++ moderno Centro di apprendimento C#Fondamenti, OOP, LINQ, async ed esercizi .NET Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++
- Sfide
Converters
XML to JSON Converter
Convert XML documents to readable JSON, keeping attributes and turning repeated elements into arrays.
- Runs in your browser
- Instant results
- Free, no sign-up
Loading the tool…
How to use the XML to JSON Converter
- Paste your XML.
- Choose the attribute prefix and whether to detect numbers and booleans.
- Copy or download the JSON.
Frequently asked questions
How are XML attributes represented?
As keys with a prefix, @ by default, so <book id="1"> becomes {"@id": 1}.
What happens to repeated elements?
Elements that appear more than once under the same parent become a JSON array.
What if an element has both text and children?
The text is kept under a "#text" key next to the child elements.
Esercitati in Python con le sfide di codice
Risolvi problemi pratici direttamente in questo editor: esegui i test di esempio, invia la soluzione e ricevi una revisione AI del codice.