82
def getNodeWithId(domDoc, id):
83
return getNodeWithId_sub(domDoc.documentElement, id)
85
def getNodeWithId_sub(node, id):
86
if node.nodeType == node.ELEMENT_NODE:
87
if node.getAttribute("id") == id:
89
if node.hasChildNodes():
90
for childNode in node.childNodes:
91
result = getNodeWithId_sub(childNode, id)
92
if not result == None: