By YiyaoPublished Updated
Convert XML without guessing the JSON structure
Paste a small XML document and review the JSON produced from its elements and attributes. Use the converter when an authorized feed, export or API response needs a predictable structure for downstream processing.
Start with a representative sample containing the fields you need. Compare the mapped result with the original before applying the same convention to a larger dataset. XML conversion and record extraction are separate steps: this tool does not decide which fields belong in your final report.
Use the input and result together
Paste XML into the input, choose Convert, and inspect the formatted JSON beside it. Copy the result or download it after checking the mapping. An error should identify the invalid input and leave the previous result marked as out of date.
Keep the original XML with your source record. Changing representation is useful for inspection, but it should not replace the source needed to explain an unusual field or a conversion decision.
Follow one documented mapping
The converter keeps the root element. An attribute becomes a property beginning with @. Repeated sibling elements with the same name become an array; a single occurrence remains a single value. Text remains a string, so an identifier such as 0017 keeps its leading zeros.
An element containing attributes and text uses #text for the text value. Empty elements produce an empty string. Mixed content, where text and child elements are interleaved, needs an order-aware transformation and is rejected by this simplified mapping.
| XML feature | JSON representation | Check |
|---|---|---|
| Root element | Named top-level property | Keep the feed or record boundary |
| Attribute id="0017" | "@id": "0017" | Preserve the identifier as text |
| Repeated item elements | item array | Count the converted records |
| Text 12.50 | String "12.50" | Convert to a number only in a later typed step |
Check a small worked example
For <items><item id="0017">Blue</item><item id="0018">Green</item></items>, the result is {"items":{"item":[{"@id":"0017","#text":"Blue"},{"@id":"0018","#text":"Green"}]}}.
Verify the two records, the two identifier strings and their matching labels. If your next task is a spreadsheet, select the item array and define columns for @id and #text. Do not pass the entire wrapper to a row-based export without checking its expected input.
Resolve unsupported structures before conversion
Correct malformed XML at the source rather than silently dropping unfinished tags. Documents with a document-type declaration or external entities are rejected. Namespace-qualified elements and mixed content require a more explicit mapping than this first version supports.
For a larger production pipeline, define the schema and record path before choosing a transformation library. Keep failures visible in the run record so an incomplete conversion cannot be mistaken for a complete collection.
Use the result in the right stage
Arcvenza Crawler Console manages collection tasks and their results. Apply this converter only when the data you actually hold is XML. General Website Crawl lists HTML and Markdown outputs; those outputs need appropriate extraction rather than relabeling them as XML.
After conversion, verify record counts and representative fields, then continue to JSON-to-CSV mapping when a table is the intended output.
For collection tasks, Explore Crawler Console. Local conversion remains a separate step.
XML conversion questions
Does this tool infer dates and numbers? No. XML text and attributes remain strings so a later schema-aware step can make that choice.
Can the JSON recreate every detail of the original XML? Keep the original source. This mapping is intended for data inspection, not a lossless XML round trip.
