load_xml

load_xml(key, *subkeys, name, parse_kwargs=None)[source]

Load an XML file with lxml.

Parameters:
  • key (str) – The module name

  • subkeys (str) – A sequence of additional strings to join. If none are given, returns the directory for this module.

  • name (str) – The name of the file to open

  • parse_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments to pass through to lxml.etree.parse().

Return type:

ElementTree

Returns:

An ElementTree object

Warning

If you have lots of files to read in the same archive, it’s better just to unzip first.