Extracting the text contents of a node

From XPUB & Lens-Based wiki

The itertext method of a node can be useful.

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