Json2xml
simplistic json -> xml converter
Install / Use
/learn @edsu/Json2xmlREADME
json2xml
A simplistic JSON to XML converter, created mainly as a way to kill time one evening after a tweet from @pbinkley. Yes, you are entitled to ask why I would ever want to convert JSON to XML. No, I'm not going to provide an answer :-)
Example
From the command line:
% ./json2xml.py tweet.json | xmllint --format - > tweet.xml
Or from your program:
from json2xml import json2xml
print json2xml("tweet.json", tag_name="tweet")
Or if you have a python data structure created by something like json.loads and you would like xml for it, get a TreeBuilder for it:
from json2xml import data2builder
from xml.etree.ElementTree import tostring
data = {"foo": "bar", "baz": [1, 2, 3]}
builder = data2builder(data, tag_name="data")
doc = builder.close()
print tostring(doc)
Related Skills
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.6kCommit, push, and open a PR
