dump_xml

dump_xml(key: str, *subkeys: str, name: str, obj: lxml.etree.ElementTree, open_kwargs: Mapping[str, Any] | None = None, write_kwargs: Mapping[str, Any] | None = None) None[source]

Dump an XML element tree to a file with lxml.

Parameters:
  • key – The module name

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

  • name – The name of the file to open

  • obj – The object to dump

  • open_kwargs – Additional keyword arguments passed to open()

  • write_kwargs – Keyword arguments to pass through to lxml.etree.ElementTree.write().