'Parse the config file for an appropriate entry point: a mako template, a script tag,
or an html file, returning as dictionary with: `type`, `file`, and `attr`ibutes of
the element.'

def parse_entry_point(self, xml_tree):

    template = xml_tree.find('template')
    if ((template is not None) and template.text):
        log.info('template    syntax    is    deprecated:    use    entry_point    instead')
        return {'type': 'mako', 'file': template.text, 'attr': {}}
    entry_point = xml_tree.find('entry_point')
    if (entry_point is None):
        raise ParsingException('template    or    entry_point    required')
    entry_point_attrib = entry_point.attrib.copy()
    entry_point_type = entry_point_attrib.pop('entry_point_type', 'mako')
    if (entry_point_type not in self.ALLOWED_ENTRY_POINT_TYPES):
        raise ParsingException(('Unknown    entry_point    type:    ' + entry_point_type))
    return {'type': entry_point_type, 'file': entry_point.text, 'attr': entry_point_attrib}
