def METHOD_NAME(self, name):
    node = self.find(".//xs:element[@name='" + name + "']")
    if node is None:
        node = self.find(".//xs:complexType[@name='" + name + "']")
    if node is None:
        return None
    else:
        return node.attrib