Quick note on the prematurely declared death of XML

I was initially taken aback when I read Douglas Crockford's blog post from a couple weeks ago titled "XML on the Web is Dead". He starts:

At the XML2006 conference in Boston last week, I heard a number of people proclaim that XML on the web is dead. XHTML is not going to replace HTML as the web's official markup language because it turns out that resilience is more useful than brittleness. And JSON is quickly displacing XML as the preferred encoding for data interchange.

I agree with the attack on XML for data interchange. What is required for data interchange is something that works and works easily. The data is consumed in JavaScript and JSON also solves the nasty little sandbox problem, so it works. No argument from me there.

As far as markup, well, this jostled me a bit more. Sure, a parser that expects only well-formed XHTML will be brittle, but that is no reason not to generate well-formed XHTML source. XHTML adds value to developers by providing namespaces and better character encoding support, right? When the XHTML is well-formed, the parsing can be done quite small and fast. When it is not well-formed, the tag soup can still generally be handled by the browser parser with some extra work. That may go against the (misguided?) aspirations for a parser that would reject such bad XHTML, but it faces the realities of compatibility in computing platforms.

When I mention namespaces as a feature here, I'm not considering it a great feature that some folks come up with XML schemas that the web browser doesn't know. I'm talking aboug SVG, MathML, and other schemas known to the browser. I hope I'm not in the minority thinking these are useful for many web developers.

Douglas went on to group the reactions of folks at the conference into three categories.

The third was "Don't say it like that." XML is in decline on the browser, but it still has a role on the server. If we go around saying it's dead, people might start looking for better alternatives.

Well, life would be boring if we weren't always looking for better alternatives. The point that browser-side programmers are looking for easier ways to exchange data, seems quite valid and I think the choice of JSON is exactly right. I think it is time for JavaScript to get some more serious usage on the server-side and there is lots to talk about there. Maybe calling XML-on-the-web dead isn't that bad a thing to say.

XML and RDF haven't delivered all the tools necessary to turn everyday web programmers into clerics of the Semantic Web. They have delivered enough to be useful, living components on the web, even if they aren't given those names. I'm curious to know if anyone has done a good study of XHTML usage as Google did for HTML usage last year. I'd still expect to find its use frequent and growing.

No comments:

Post a Comment