Skip to content
Converting XML should be easy -- and fast.
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Converting XML to a dictionary should be easy -- and fast.

Most of the current XML to dict projects are either unmaintained, slow, or not well-tested. This shouldn't be the case.


You can either clone this repo or use pip.

pip install relaxml


>>> from relaxml import xml

>>> some_xml = open('file.xml')
>>> xml(some_xml)
{'ohai': {'xml': 'data'}}

>>> import requests as req
>>> content = req.get('').text
>>> xml(content)
{'ohai': {'xml': 'data'}}
Something went wrong with that request. Please try again.