def getElementById(self, node, id, default=join):
attrget = self.getAttr<EOL>ELEMENT_NODE = node.ELEMENT_NODE<EOL>for child in node.childNodes:<EOL><INDENT>if child.nodeType == ELEMENT_NODE:<EOL><INDENT>if attrget(child, '<STR_LIT:id>') == id:<EOL><INDENT>return child<EOL><DEDENT><DEDENT><DEDENT>if default is not join:<EOL><INDENT>return default<EOL><DEDENT>raise KeyError(name)<EOL>
Return the first child of node matching an id reference.