code: def from_file(cls, xml_path):
      
      try:
        parsed_xml = cls._parse(xml_path)
      except OSError as e:
        raise XmlParser.XmlError("Problem reading xml file at {}: {}".format(xml_path, e))
      return cls(xml_path, parsed_xml)
docs: Parse .xml file and create a XmlParser object.