code: def update_from_element(self, elem):
          
          self._elem = elem
  
          for attrname in self.attributes:
              try:
                  delattr(self, attrname)
              except AttributeError:
                  pass
  
          document_url = elem.attrib.get('href')
          if document_url is not None:
              self._url = document_url
  
          return self
docs: Reset this `Resource` instance to represent the values in
          the given XML element.