If space is not meaningful to you, you should use the "remove_blank_text" option in the parser and/or use a DTD. It's more of a parser issue than a serialiser issue, really. And lxml can't know during parsing that you are going to ask for pretty printing during serialisation.
If space is not meaningful to you, you should use the "remove_blank_text" option in the parser and/or use a DTD. It's more of a parser issue than a serialiser issue, really. And lxml can't know during parsing that you are going to ask for pretty printing during serialisation.