XML转JSON
提供XML转JSON的交互处理。
使用步骤
如何使用
- Paste valid XML up to 200,000 characters.
- Convert it and review the JSON mapping for elements, attributes, arrays, and text.
- Copy the JSON or download it as a .json file.
Predictable XML mapping
The document element becomes the top-level JSON property. Child elements become properties, repeated siblings become arrays, and attributes are grouped under @attributes. Text that appears alongside child elements is kept under #text so mixed content is not silently lost.
Local parsing with clear boundaries
Parsing, conversion, copying, and download preparation happen in your browser. Comments and processing instructions are ignored, CDATA becomes text, and empty elements become empty strings. The converter does not fetch external entities or remote resources.
常见问题
你可能还想知道
How are repeated XML elements represented?
Repeated siblings with the same name become a JSON array in their original order.
Where do XML attributes go?
Attributes are collected under an @attributes object on the corresponding element.
Does conversion upload my XML?
No. XML parsing and JSON conversion happen locally in your browser.