Streamlining DOM XML processing with Python
Generators are a very powerful new language feature of Python 2.2. In this tip, Uche Ogbuji presents a set of techniques for using generators for fast and lucid XML processing patterns in Python.
http://www-106.ibm.com/developerworks/library/x-tipgenr.html