Posted By

silviud on 09/21/10


python xml

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


get text from xml node (xml.dom)

 / Published in: Python

  1. def get_text(node_list):
  2. text = []
  3. for node in node_list:
  4. if node.nodeType == node.TEXT_NODE:
  5. text.append(
  6. return "".join(text).strip()

Report this snippet  

You need to login to post a comment.