[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

Stefan Behnel report at bugs.python.org
Fri Mar 8 03:58:56 EST 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

lxml does not support the "default_namespace" option specifically (because its tree model preserves namespace prefixes), but it generally makes all (justifiable) serialisation options available to both tostring() and ET.write().

I think the same should apply to ElementTree. Both the "default_namespace" and "doctype" options seem useful regardless of the serialisation target.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36227>
_______________________________________


More information about the Python-bugs-list mailing list