Re: [xml] XHTML 1.0 to HTML 4.01

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
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.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]