In some internal discussions of the XLinq http://msdn.microsoft.com/netframework/future/linq/ project, I got a very interesting bit of devil's advocacy that went something like this: "People complain about the DOM, but they don't embrace alternatives. For all the work that people have done to provide alternatives such as JDOM, dom4j, XOM, etc. in the Java world, the typical users and the major Java players still use DOM, warts and all." I'm not at all convinced this is true, but I don't have any information at my fingertips to dispute it. Would anyone care to present facts on one side or the other?
But if this is true, why have cleaner, programming language-friendly alternatives failed to displace the dear old DOM as the dominant XML programming model after all these years? I have a few hypotheses (and these are MY hypotheses, not some FUD from Evil Empire Central Command, so blame me for any stupidities and the blatant exaggerations).
- Duh, the network effect. A mediocre standard beats a better non-standard every time.
- Serious XML developers use XSLT for the heavy lifting and simply don't worry about APIs any more.
- Sun and IBM haven't included any of the alternatives in their distributions, so the masses don't even know these things exist, or fear being stranded in a backwater if they do adopt one.
- Compiled languages are *so* last century, all the interesting XML processing alternatives are in the dynamic languages world. [E4X | Python | Ruby | PHP | Scala ] rulez, who cares about any of that stuff anymore?
Thoughts on any of these hypotheses, anyone?
I must emphasize that the XLinq project is very much on track, has strong management support, and you can expect updated preview bits / samples / documentation Real Soon Now, so I'm not trying to drum up external support for any internal battles. Likewise, Microsoft has absolutely no plans to deprecate XmlDocument (the DOM vehicle in .NET) ... I'm just doing the usual xml-dev navel gazing thing :-)