Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Converting XML should be easy -- and fast.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 relaxml
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
Octocat-spinner-32 test.py
README.md

relaxml

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.

Installation

You can either clone this repo or use pip.

pip install relaxml

Usage

>>> from relaxml import xml

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

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