def _parse_vasp_fermi(xml_tree):
    """Extract the Fermi level from an XML ElementTree representing a
    vasprun.xml file.
    """
    xml_dos = xml_tree.find('./calculation/dos')
    return float(xml_dos.find('./i[@name="efermi"]').text)
