Closed jkowalleck closed 11 months ago
ElementTree.tostring()
's default_namespace
parrameter is not available before py38
one could register the namespace as an empty-string-id ... but if this is done, then the existence of the NS must ceckecked, it must not be overridden. and the registration must be reverted, after all is done ...
ElementTree.register_namespace('', xmlns)
ElementTree.tostring(
the-thing, method='xml',
encoding='unicode',
# default_namespace=xmlns # not avialable in py37, ... need to register NS globally
)
feature is possible to implement downstream, and might already e availave via convinience-methods.
.to_xml()
currently returns likethe defaultNS can be just set properly, and hen the NS-id can be omitted. like
using a defaultNS would make the resulting documents smaller, but still equal.
requires #11 & #12