I have this code with ElementTree that works well with Python 2.7. I needed to get all the nodes with the name \"A\" under \"X/Y\" node.
from xml.etree.Elem
Note that iter is available in Python 2.6 (and even 2.5 - otherwise, there'd be a notice in the docs), so you don't really need a replacement.
iter
You can, however, use findall:
def _iter_python26(node): return [node] + node.findall('.//*')