untangle

Convert XML documents into Python objects
Download

untangle Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Publisher Name:
  • Christian Stefanescu
  • Publisher web site:
  • https://github.com/stchris/

untangle Tags


untangle Description

Convert XML documents into Python objects untangle is a Python module to convert XML documents into Python objects.Installation:```git clone git://github.com/stchris/untangle.gitpython setup.py testpython setup.py install```Works on Python 2.6, 2.7 and Pypy so far. Doesn't (completely) work on 2.4, 2.5, 3.x yet.Usage:(See and run < a href="https://github.com/stchris/untangle/blob/master/examples.py" >examples.py< /a > for more info)```pythonimport untangleobj = untangle.parse(resource)`````resource`` can be:* a URL* a filename* an XML stringRunning the above code and passing this XML:```xml< ?xml version="1.0"? >< root > < child name="child1" >< /root >```allows it to be navigated from the ``untangle``d object like this:```pythonobj.root.child # u'child1'```


untangle Related Software