def get_element_text(dom_element):
    """
        Get the content of the element from it's text node (if one exists)
    """
    return " ".join(t.nodeValue for t in dom_element.childNodes if t.nodeType == t.TEXT_NODE)