June 7, 2012
11:29 a.m.
Le 07/06/2012 12:47, Andreas Maier a écrit :
I actually found a solution to this problem, by specifying more parameters to the etree.tostring() function:
fp.write(etree.tostring(... method="html"))
Alternatively, html5lib can serialize lxml trees: http://code.google.com/p/html5lib/wiki/UserDocumentation#Serialization_of_St... https://github.com/Kozea/docutils-html5-writer/blob/master/docutils_html5/__... Regards, -- Simon Sapin