def parse_entity_id(self, xml_root):
    try:
        entity_descriptor = xml_root.xpath(MetadataExtractor.XPATHS['entity_descriptor'], namespaces=MetadataExtractor.NAMESPACES)[0]
        self.entity_id = entity_descriptor.attrib['entityID']
    except (KeyError, IndexError):
        raise MissingValue('Unable to parse entityID')
def parse_entity_id(self, xml_root):
    try:
        entity_descriptor = xml_root.xpath(MetadataExtractor.XPATHS['entity_descriptor'], namespaces=MetadataExtractor.NAMESPACES)[0]
        self.entity_id = entity_descriptor.attrib['entityID']
    except (KeyError, IndexError):
        raise MissingValue('Unable to parse entityID')