[svlug] XML vs HTML

Nate Campi nate at wired.com
Sun Jul 8 13:12:01 PDT 2001


On Sun, Jul 08, 2001 at 02:09:54PM -0400, Bill Jonas wrote:
> On Sun, Jul 08, 2001 at 10:04:20AM -0600, Karl F. Larsen wrote:
> > 	My question to you is, as web designers, have you found a good
> > reason to switch from HTML to XML? What are the reasons?
> 
> The utility of XML is more for data exchange than for marking up web
> pages.  In fact, until there is something like a mod_xml, or some sort
> of XML -> HTML "compiler", or if you're using if to store data for CGI
> programs to translate, its utility will be rather limited in web design
> since there are no web browsers (to my knowledge) that support XML
> directly.
> 
> OTOH, the comments above are not intended to apply to SOAP, which is a
> sort-of RPC via XML over HTTP... but in any case, you wouldn't really
> write web pages in XML.

Bill is right on the money, web pages aren't usually written in XML, not directly. Quick example - we had to redesign an online news service for the parent company, and instituted a multi-tiered architecture that spits stories out of the middle-tier in XML format. This XML isn't a story that can be viewed in a browser, but is intended to be parsed by another app (usually ASP on a Win2K box, arrg). It's up to the front-end tier to decide how to display it.

The beauty of this whole thing is that the XML can be pulled into quote.com and shown from a java servlet on some investor's news page, or pulled into one of our Latin American sites and displayed in plain HTML there. Even playboy.com pulls down the XML to diplay news on their site. It allow maximum flexibility for us with the data we want to publish, keeping the presentation totally separate from the data (the whole idea of XML).

This sort of architecture is one place where XML fits quite well.
-- 
Nate Campi  (415) 276-8678  UNIX Ops, Terra Lycos - WiReD SF




More information about the svlug mailing list