lxml.objectify drops leading whitespace
May 24, 2013
12:03 p.m.
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
4479
Age (days ago)
4610
Last active (days ago)
2 comments
2 participants
participants (2)
-
Holger Joukl -
Wolfgang Schnerring