:return: text from the parsed parent element if it has a text value,
    otherwise the default value.
    :see: get_element(parent_to_parse, element_path)

def get_element_text(parent_to_parse, element_path=None, default_value=u''):
    """
    :return: text from the parsed parent element if it has a text value,
    otherwise the default value.
    :see: get_element(parent_to_parse, element_path)
    """

    parent_element = get_element(parent_to_parse, element_path)

    if parent_element is None:
        return default_value

    if parent_element.text:
        return parent_element.text.strip() or default_value

    return default_value