Forums

Best way to import/convert XML to something sane?

I have to parse a data packet in XML. No person should be forced to work in XML.

A quick search did not reveal any obvious tolls here for converting XML to a DICT or JSON. So I was wondering if you had support for any?

A quick GOOGLE search suggests these two would be useful, in case you can add them to the build:

  1. https://pypi.python.org/pypi/xmljson
  2. https://github.com/Juniper/jxmlease

Item 1 is on pypy, perhaps one can PIP install it? The second item was part of a book, and perhaps a little more sophisticated?

Thanks in advance,

Rich.

I can't comment on which one of those might be best but you can certainly install them both. more info here: http://help.pythonanywhere.com/pages/InstallingNewModules