(node, Id, tagname)
Search element by id in the all childs and descendant of node.

    id is lower case, not ID which is usually used for gelElementById
Search element by id in the all childs and descendant of node.
Search element by id in the all childs and descendant of node .
def searchElementById(node, Id, tagname):
    """
    Search element by id in the all childs and descendant of node.

    id is lower case, not ID which is usually used for gelElementById
    """
    nodes = node.getElementsByTagName(tagname)
    for node in nodes:
        an = node.getAttributeNode('id')
        if an and an.nodeValue == Id:
            return node
def searchElementById ( node , Id , tagname ) : nodes = node . getElementsByTagName ( tagname ) for node in nodes : an = node . getAttributeNode ( 'id' ) if an and an . nodeValue == Id : return node