Convert JSON to XML in Python

Nothing came back right away, so I went ahead and wrote a script that solves this problem.

Python already allows you to convert from JSON into a native dict (using json or, in versions < 2.6, simplejson), so I wrote a library that converts native dicts into an XML string.

https://github.com/quandyfactory/dict2xml

It supports int, float, boolean, string (and unicode), array and dict data types and arbitrary nesting (yay recursion).

Leave a Comment