code: def get_attribute(self, element, attribute):
      
      parsed_element = self.parsed.getElementsByTagName(element)
      if not parsed_element:
        raise self.XmlError("There is no '{0}' element in "
                            "xml file at: {1}".format(element, self.xml_path))
      parsed_attribute = parsed_element[0].getAttribute(attribute)
      if not parsed_attribute:
        raise self.XmlError("There is no '{0}' attribute in "
                            "xml at: {1}".format(attribute, self.xml_path))
      return parsed_attribute
docs: Retrieve the value of an attribute that is contained by the tag element.
  
      :param string element: Name of an xml element.
      :param string attribute: Name of the attribute that is to be returned.
      :return: Desired attribute value.
      :rtype: string