def xml_find_non_text_child(_node): """Finds the first child that is not of the Text node type.""" nodelist = _node.childNodes for node in nodelist: if node.nodeType != node.TEXT_NODE: return node return None