DataFileConverter parses an XML file and writes JSON: elements become keys, repeated elements become arrays, attributes are kept only if you ask. One file to one JSON, a folder in batch, or many files merged into one array. Desktop app for Windows, Linux and macOS — GUI and command line, nothing uploaded.
The root becomes an object, child elements become keys, and text content becomes the value — a mapping you can preview before writing.
<item> appearing five times produces a JSON array of five objects instead of five colliding keys.
Write a single JSON document, a bare array of records, or one object per line for stream processing.
One .json per XML file, a merged array, or a scheduled command line on Windows, Linux and macOS.
json.load; check the first record before handing it on. 📷XML is a tree with attributes and text nodes; JSON has objects, arrays and values. The conversion is that mapping — and the first decision (which element repeats) is what makes the difference between a clean array and a nest of objects.
| XML | JSON |
|---|---|
<order><id>1001</id><total>129.90</total></order> | {"order":{"id":"1001","total":"129.90"}} — elements become keys |
<item>…</item> repeated under one parent | an array: {"items":[{"…"},{"…"}]} |
<order id="1001"> | {"order":{"@id":"1001", …}} when attributes are kept; ignored otherwise |
text-only element <name>ACME</name> | "name":"ACME" — the string, not an object |
<br/> or mixed content | an ordered array of text and element objects, which most consumers dislike — check that record |
xmlns:ns="…" on a parent | the prefix stays part of the key (ns:field) unless you strip it in the source configuration |
<![CDATA[…]]> | the text content, unescaped; a JSON string escapes quotes and newlines itself |
Save the task once, then parse XML to JSON from a .sh on Linux or macOS, or a .bat on Windows. That is the usual shape: an export lands in a folder, a cron (or launchd / Task Scheduler) job runs one line, and the JSON is ready for the API or the loader. The CLI prints one line per file, so a broken file is visible in the log instead of silently missing.
The unit of reuse is the saved task file, not the command: the session records the mapping (row element, attributes, JSONL or array), so a scheduled run only has to point at a different input folder. That is what makes the same job usable for a daily drop and for a one-off backfill — and why the run is worth checking by exit status rather than by eye.
.bat line under Task Scheduler, a .sh line under cron on Linux or launchd on macOS.Other targets from the same source: XML to CSV, XML to Excel, XML to TXT and XML to TSV; the reverse direction is JSON to XML.
ns:field and field are different keys; strip the prefix deliberately, or your consumers see two names for one field.& in the markup becomes & in the JSON string, and a literal < stays inside the string rather than starting a tag.<item>) rather than the root.json.load or the editor's formatter once; a stray control character from the source XML shows up here, not at load time.@id) so they cannot collide with a child element of the same name. Turn them off and the attribute is dropped.[] for single records too).Envelope/Body wrapper as keys (unwrap in your consumer), and Android layouts are deep trees — pick the repeating element instead of the root.One file, a folder in batch, or a merge into one array — free trial, no credit card.
$75 one-time · volume discounts to $55 · 30-day money-back · pricing & licence terms
Download Free Trial