def stringify_children(node):
    from lxml.etree import tostring
from itertools import chain
parts = [node.text] + list(chain(*([c.text, tostring(c), c.tail] for c in
    node.getchildren()))) + [node.tail]
Get all text inside a tag in lxml