XMLReader.from_file

classmethod XMLReader.from_file(source, tree_parser=None)

Construct a reader from a source file.

Parameters
  • source (path string | file-like object | URL string) – A path, a file-like object or a URL pointing to a file.

  • tree_parser (ET.XMLParser, optional) – A custom tree parser.

Returns

compas.files.XMLReader