On Thu, Jan 24, 2008 at 04:06:44PM +0100, Florent Guiliani wrote: > Hi xml at gnome, > > I wonder if there a way, within libxml2, to convert an XML document > (xmlDocPtr) > that contains valid XHTML 1.0 into HTML 4.01 ? A way with only libxml2 > function > calls would be perfect.
You could try htmlSaveFile after replacing the doctype as a first approximation. > Or do I need to use external tools like a stylesheet, tidy, or DIY DOM > serialiser ? a good stylesheet with libxslt is likely to be the most portable/shareable solution, and such xsl may be already available. Tidy is another option but IMHO it's more about cleaning up web HTML than in the other direction. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
