>For this site, and even for the more straightforward web sites I am
>building, how can I build it in order to retain compatibility with
>earlier browsers, while making it as easy as possible to convert it to
>XML when (if?) it becomes available?
My simplest recommendation is to use the DIV and SPAN elements in HTML, and
use the CLASS attribute to identify the 'real' XML element it's supposed to
be. As far as I've seen, you can even use the attributes you'll want to use
in your XML document, provided they aren't using the same name as an HTML
This won't work perfectly; older browsers don't know what the DIV and SPAN
tags mean, and certainly won't associate them with the style sheets you'll
need to use to make this work.
If that's not good enough, you might want to come up with an HTML mapping for
your XML elements - a set of HTML tags that will correspond precisely to one
XML tag. That way, you should (if you're very careful and lucky) be able to
do a search and replace on the document to transform it most of the way to
XML. Just remember to keep your HTML up to XML 'well-formed' standards -
closing tags, quoted attributes, etc. You'll still have to deal with empty
tag syntax, the XML declaration, etc., but it should be easier.
Dynamic HTML: A Primer / XML: A Primer / Cookies