Forcing XHTML serialization
![](https://secure.gravatar.com/avatar/a756760b07d795f68a1dc9608243190f.jpg?s=120&d=mm&r=g)
17 May
2011
17 May
'11
10:49 p.m.
Hi Stephen, I'm trying to work out how to enable the HTML compatible XHTML serialization that is triggered by an XHTML 1.0 doctype without specifying that doctype - I want to use the HTML5 "<!DOCTYPE html>" instead. I see that in version 2.7.2 libxml2 added an XML_SAVE_XHTML flag to force the HTML compatible XHTML serialization behaviour. That flag has since been added to lxml's tree.pxd, but I'm unable to find an example that uses it. Is it possible to enable the flag somehow with lxml? Also, in http://mail.gnome.org/archives/xml/2008-September/msg00029.html there is mention of an option to disable the automatic meta content-type tag generation. Do you know if anything came of it? Many thanks, Laurence
4856
Age (days ago)
4856
Last active (days ago)
0 comments
1 participants
participants (1)
-
Laurence Rowe