Extracting the text contents of a node

From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search

The itertext method of a node can be useful.

for t in node.itertext():
    print t
text = "".join(list(node.itertext()))