def ln_from_etree(self,ln_element,context=''):
        ln = {}
        # grab all understood attributes into ln dict
        for att in ('hash','href','length','modified','path','rel','pri','mime_type'):
            xml_att = self._xml_att_name(att)
            val = ln_element.attrib.get(xml_att,None)
            if (val is not None):
                ln[att] = val
        # now do some checks and conversions...
        # href (MANDATORY)
        if ('href' not in ln):
            raise SitemapParseError("Missing href in <rs:ln> in %s" % (context))
        # rel (MANDATORY)
        if ('rel' not in ln):
            raise SitemapParseError("Missing rel in <rs:ln> in %s" % (context))
        # length in bytes
        if ('length' in ln):
            try:
                ln['length']=int(ln['length'])
            except ValueError as e:
                raise SitemapParseError("Invalid length attribute value in <rs:ln> for %s" % (context))
        # pri - priority, must be a number between 1 and 999999
        if ('pri' in ln):
            try:
                ln['pri']=int(ln['pri'])
            except ValueError as e:
                raise SitemapParseError("Invalid pri attribute in <rs:ln> for %s" % (context))
            if (ln['pri']<1 or ln['pri']>999999):
                raise SitemapParseError("Bad pri attribute value in <rs:ln> for %s" % (context))
        return(ln)


    ##### Metadata and link elements #####
Setup notifications for all platforms.
dataset/ETHPy150Open resync/resync/resync/sitemap.py/Sitemap.ln_from_etree--crossover with--dataset/ETHPy150Open facelessuser/SubNotify/lib/notify/__init__.py/setup_notifications