def get_doc_id(element_tree):
    """
    returns the document ID of a SaltXML document.

    :param tree: an ElementTree that represents a complete SaltXML document
    :type tree: ``lxml.etree._ElementTree``
    """
    id_element = element_tree.xpath('labels[@name="id"]')[0]
    return id_element.attrib['valueString']