Some enterprise endpoints, older SOAP services and Java tooling still only accept XML. When your data lives in JSON, here's the shortest path across.
Given users.json:
[
{ "name": "Alice", "age": 32 },
{ "name": "Bob", "age": 20 }
]
$ npx github:mahope/transmute users.json --output xml --pipe '[{"op":"head","n":10}]' <?xml version="1.0" encoding="UTF-8"?> <data> <item> <name>Alice</name> <age>32</age> </item> ... </data>
Because parsing, transforming and serializing are separate steps, you can reshape before emitting XML:
$ npx github:mahope/transmute users.json --pipe '[{"op":"filter","expr":"item.age >= 21"},{"op":"sort","by":"name"}]' --output xml
import json from dicttoxml import dicttoxml data = json.load(open("users.json")) print(dicttoxml(data).decode())
pip install dicttoxml. Works, but pulls in more of your dependency tree than most one-off jobs justify.
&, <). A serializer handles this; string concatenation does not.The Transmute CLI is free (npx github:mahope/transmute). The desktop app adds an interactive pipeline builder, live preview and batch processing — one-time $19, no subscription.
More guides: XML to JSON · JSON to CSV pipelines