def findTargetNS(self, node):
attrget = self.getAttr<EOL>attrkey = (self.NS_XMLNS, '<STR_LIT>')<EOL>DOCUMENT_NODE = node.DOCUMENT_NODE<EOL>ELEMENT_NODE = node.ELEMENT_NODE<EOL>while <NUM_LIT:1>:<EOL><INDENT>if node.nodeType != ELEMENT_NODE:<EOL><INDENT>node = node.parentNode<EOL>continue<EOL><DEDENT>result = attrget(node, '<STR_LIT>', default=None)<EOL>if result is not None:<EOL><INDENT>return result<EOL><DEDENT>node = node.parentNode<EOL>if node.nodeType == DOCUMENT_NODE:<EOL><INDENT>raise DOMException('<STR_LIT>')<EOL><DEDENT><DEDENT>
Return the defined target namespace uri for the given node.