W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

Re: xml to html

From: Steve Ball <Steve.Ball@zveno.com>
Date: Sat, 01 Apr 2000 09:07:00 -0500
Message-ID: <38E60284.9D503F47@zveno.com>
To: suresh.dussa@wipro.com
CC: DOM <www-dom@w3.org>
Suresh Dussa wrote:
> 
> This may sound ridiculous but I've got a requirement where in XML needs to
> be converted to HTML.

Well, in that case an awful lot of people are being ridiculous!

Converting XML to HTML is a common task.

> Can this be possible using any DOM SDK?

DOM SDKs generally emit XML when asked to serialize their
content.  Of course, using a DOM SDK it is perfectly reasonable
to create a XHTML document, and serialize that.

Another approach would be to traverse the DOM tree of your XML
document and create the appropriate HTML as you go.

Finally, a very common approach is not to use DOM at all,
but rather use XSLT for converting XML to HTML.

HTHs,
Steve Ball

-- 
Steve Ball            |   Swish XML Editor    | Training & Seminars
Zveno Pty Ltd         |   Web Tcl Complete    |      XML XSL
http://www.zveno.com/ |    TclXML TclDOM      | Tcl, Web Development
Steve.Ball@zveno.com  +-----------------------+---------------------
Ph. +61 2 6242 4099   | Mobile (0413) 594 462 | Fax +61 2 6242 4099
Received on Friday, 31 March 2000 17:54:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT