def find_attribute_or_element(self, parent, name):
        if parent.hasAttribute(name):
            return parent.getAttribute(name)

        node = self.find_first_child_named(parent, name)
        if node:
            return self.extract_text(node)

        return None
Used in mcscanq() for query
dataset/ETHPy150Open openstack/rack/rack/api/wsgi.py/XMLDeserializer.find_attribute_or_element--crossover with--dataset/ETHPy150Open tanghaibao/jcvi/compara/synteny.py/BlockFile.query_gene