Preserving whitespace during lxml serialization
is there a way to retain whitespaces when serializing an etree.Element with lxml?
E.g.:
turns into:
which is not the desired behaviour.
With xml.Etree this works (I guess because of this short_empty_elements=True), but I have to use lxml.