daemon/core/misc/xmlparser1.py
def search_for_element(node, tagName, match = None):
        '''\
        Search the given node and all ancestors for an element named
        tagName that satisfies the given matching function.
        '''
        while True:
            for child in iterChildren(node, Node.ELEMENT_NODE):
                if child.tagName == tagName and \
                        (match is None or match(child)):
                    return child
            node = node.parentNode
            if not node:
                break
        return None
\
        Search the given node and all ancestors for an element named
        tagName that satisfies the given matching function.
        
\
Search the given node and all ancestors for an element named
tagName that satisfies the given matching function.
\ Search the given node and all ancestors for an element named tagName that satisfies the given matching function .
def search_for_element(node, tagName, match = None):
        while True:
            for child in iterChildren(node, Node.ELEMENT_NODE):
                if child.tagName == tagName and \
                        (match is None or match(child)):
                    return child
            node = node.parentNode
            if not node:
                break
        return None
def search_for_element ( node , tagName , match = None ) : while True : for child in iterChildren ( node , Node . ELEMENT_NODE ) : if child . tagName == tagName and ( match is None or match ( child ) ) : return child node = node . parentNode if not node : break return None
\
Search the given node and all ancestors for an element named
tagName that satisfies the given matching function.
\ Search the given node and all ancestors for an element named tagName that satisfies the given matching function .
'''\
        Search the given node and all ancestors for an element named
        tagName that satisfies the given matching function.
        '''
node
tagName
match