S SearchRSS
< BackHome
Newest questions tagged python - Stack Overflow

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), b

View original source