def _getattr(self, name):
    return self.etElem.get(name)


class GeeTree(object):
    """Wrapper around an ElementTree."""

def __init__(self, fname):
    self.doc = ET.parse(fname)

def __getattr__(self, name):
    if self.doc.getroot().tag != name:
        raise IndexError("No element named '%s'" % name)
return GeeElem(self.doc.getroot())

def getroot(self):
    return self.doc.getroot()
Really simple way to deal with XML in Python?