XML Is Too Hard, Part 2
orangerobot writes "A new article on XML.com summarizes some of the response from the XML-DEV mailing list to Tim Bray's recent comments about his frustrations with XML. The overall feedback is mixed but several parsing packages are mentioned that satisfy some of Bray's complaints about the difficulty of using DOM and SAX-based APIs. The packages include Pyxie, XML::Filter::Dispatcher and XML::Essex."
Jorn at robotwisdom has been ranting about XML for a years now.
xmlsucks.org has a whole wiki of xml rants.
The Advogato has discussed xml evils at least once. There are more rants in the user journals if you've got time to search.
XML is just a text markup - a very verbose, flexible one at that. It's not much different than a good hammer. Great tool for pounding nails ... but not everything is a nail ...
mx
...this thread on Lambda the Ultimate for a recent discussion of issues related to Bray's article.
Experience is a hard school, but fools will learn no other.
DOM seems like a good standard to have around, but if you really want ease of use and don't have to worry about making your code portable across different languages, go for one of the more implementation-specific APIs. JDOM looks really cool -- at least, it looks very natural if you're a Java programmer.
"First you gotta do the truffle shuffle."
The real problem is that XML got so overhyped that now people want to use it for everything.
I mean, come on. XML is a good tool for a lot of things. But what reason is there to, for example, create a language which translates between XML formats in XML? That could just as easily have been done in another format, and would probably have come out looking a lot nicer.
As for the API's being too difficult: well, it is programming (which has some level of difficulty inherent in it, though it need not be absurdly tough). Besides which, the API's were meant to be generic, and you know what they say about jacks of all trades. Implement your own API, on top of SAX or the DOM (you'd probably get better efficiency if you used SAX, but the DOM may be easier for some programmers), and you'll have something what's easier to work with for your particular project, without sacrificing the portability that SAX and the DOM bring. Seriously, it's just a matter of coming up with creative solutions.
By the way, am I the only one who's thinking of doing a satirical cartoon zbout this mess? Like maybe a Barbie doll that says "XML Is Hard" or something like that?