def __getattr__(self, name):
        '''
        If an element with the given name has already been added, just
        return that element.  Otherwise, return a new element with the
        given name and this object as a parent.  This does NOT add the
        returned element to this object yet, you still need to call the
        returned element to add it.
        '''
        if name.startswith('_'):
            return object.__getattr__(self, name)
        if name in self._element_map:
            return self._element_map[name]
        element = EasyXML(name)
        element._parent = self
        return element
dataset/ETHPy150Open evanw/easyxml/easyxml.py/EasyXML.__getattr__/original