def ln_from_etree(self,ln_element,context=''):
        """Parse rs:ln element from an etree, returning a dict of the data

        Parameters:
            md_element - etree element <rs:md>
            context    - context string for error reporting
        """
        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 __HOLE__ 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 #####
dataset/ETHPy150Open resync/resync/resync/sitemap.py/Sitemap.ln_from_etree