def has_property(elem_to_parse, xpath):
    """
    Parse xpath for any attribute reference "path/@attr" and check for root and presence of attribute.
    :return: True if xpath is present in the element along with any attribute referenced, otherwise False
    """

    xroot, attr = get_xpath_tuple(xpath)

    if not xroot and not attr:
        return False
    elif not attr:
        return bool(get_elements_text(elem_to_parse, xroot))
    else:
        return bool(get_elements_attributes(elem_to_parse, xroot, attr))