/ Published in: Python
Expand |
Embed | Plain Text
def get_text(node_list): text = [] for node in node_list: if node.nodeType == node.TEXT_NODE: text.append(node.data) return "".join(text).strip()
You need to login to post a comment.
silviud on 09/21/10
1 person have marked this snippet as a favorite
def get_text(node_list): text = [] for node in node_list: if node.nodeType == node.TEXT_NODE: text.append(node.data) return "".join(text).strip()
You need to login to post a comment.