The ElementTree Module
The Element type is a simple but flexible container object, designed to store hierarchical data structures, such as simplified XML infosets, in memory. The element type can be described as a cross between a Python list and a Python dictionary, which makes it easy to use for anyone who’s done a little Python programming.
The core ElementTree modules, including cElementTree, have been included in Python 2.5, in the xml.etree package.
For more information, see ElementTree Overview.
For a small and fast implementation, see The cElementTree Module.
For an independent implementation based on libxml2 and libxslt, see
lxml (dead link).