dump_xml

dump_xml(key, *subkeys, name, obj, open_kwargs=None, write_kwargs=None)[source]

Dump an XML element tree to a 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

  • obj (ElementTree) – The object to dump

  • open_kwargs (Optional[Mapping[str, Any]]) – Additional keyword arguments passed to open()

  • write_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments to pass through to lxml.etree.ElementTree.write().

Return type:

None