Hello,
lxml.objectify drops leading whitespace before a tag:
>>> lxml.etree.tostring(lxml.objectify.fromstring('<p> <a>foo</a></p>'))
'<p><a>foo</a></p>'
while lxml.etree handles the same situation just fine:
>>> lxml.etree.tostring(lxml.etree.fromstring('<p> <a>foo</a></p>'))
'<p> <a>foo</a></p>'
What's the reason for the different behaviour? Is this intentional? Most
importantly, how can I make lxml.objectify preserve whitespace correctly?
Thanks for your help,
Wolfgang