def gettext(element):
    """Returns the atcual content of a leaf element as a text string."""
    return '.'.join([node.data for node in element.childNodes
                    if node.nodeType == node.TEXT_NODE])