diff --git a/docs/contents.rst.inc b/docs/contents.rst.inc index 5af8c0fcf..ca3698329 100644 --- a/docs/contents.rst.inc +++ b/docs/contents.rst.inc @@ -54,6 +54,7 @@ different scenarios. scenarios/speed scenarios/scientific scenarios/imaging + scenarios/xml Shipping Great Code diff --git a/docs/scenarios/xml.rst b/docs/scenarios/xml.rst new file mode 100644 index 000000000..df89d580a --- /dev/null +++ b/docs/scenarios/xml.rst @@ -0,0 +1,34 @@ +XML parsing +=========== + +untangle +-------- + +`untangle `_ is a simple library which takes +an XML document and returns a Python object which mirrors the nodes and +attributes in its structure. + +For example, an xml file like this: + +.. code-block:: xml + + + + + + +can be loaded like this: + +.. code-block:: python + + import untangle + obj = untangle.parse('path/to/file.xml') + +and then you can get the child elements name like this: + +.. code-block:: python + + obj.root.child['name'] + +untangle also supports loading XML from a string or an URL. +