Python: How do you get an XML element's text content using xml.dom.minidom?
wait a mo... do you want ALL the text under a given node? It has then to involve a subtree traversal function of some kind. Doesn't have to be recursive but this works fine:
def get_all_text( node ): if node.nodeType == node.TEXT_NODE: return node.data else: text_string = "" for child_node in node.childNodes: text_string += get_all_text( child_node ) return text_string