Slashdot Mirror


Why XML Doesn't Suck

Richard Eriksson writes "Recalling the earlier discussion on why XML sucks for programmers, Tim Bray clarifies his stance on his co-creation, XML, and gets back on his pulpit to declare that XML Doesn't Suck. He writes: 'Let's look at some of XML's chief virtues, then I'll address some of the XML-sucks arguments, in the same spirit that Sammy Sosa addresses a fastball.'"

7 of 384 comments (clear)

  1. Re:Hang on... by Anonymous Coward · · Score: 5, Informative

    Actually its doing a 180.

  2. Re:Hang on... by cant_get_a_good_nick · · Score: 5, Informative

    It is doing a 360

    Going around in circles yet ending up where you started? I think you mean 180.

    We're going to turn this team around 360 degrees.
    - Jason Kidd, upon his drafting to the Dallas Mavericks


    That sounds like the Mavs., going around in circles but never really going anywhere.
    - Me.

    Well, then anyway, they're not all that bad at the moment, best motion offense in the league.

  3. Tim Bray's Original Post Was Off Base by Carnage4Life · · Score: 4, Informative

    The main thesis of Tim Bray's original post was that he didn't like having to choose between either storing all his data in memory (i.e. DOM) or using a callbacks(i.e. SAX) when processing XML. The problem with this kind of thinking is that although it may have been true two or three years ago that the only way to process XML was via DOM or SAX this is no longer the case.

    There are more classes of APIs supported on multiple platforms for processing XML such as pull-based APIs and cursor based APIs which are represented by the System.Xml.XmlReader and System.Xml.XPath.XPathNavigator in the .NET Framework. Similar APIs exist in the Java world as well as Python from what I've heard. This is besides the current push in some quarters for programming languages that natively process XML (i.e. intrinsicly understand an XML datamodel or datatype).

    Tim Bray's original problem was that he doesn't have a pull-based API for XML parsing in Perl. I pointed out in my kuro5hin diary how the pseudo code he showed as being his ideal for processing XML already exists in C# and .NET Framework. This article on XML.com points to other people who also point out that such pull-based APIs for processing XML are available on other platforms and languages as well.

  4. Re:I DO hate XML by EastCoastSurfer · · Score: 4, Informative

    It never ceases to amaze me how many people think XML is a language.

    LOL, so true. Maybe /. should link to a XML FAQ each time they do a story.

    XML document == data in a well defined format

    XSL/XSLT == tells how to display XML data(think FOP), but is itself a valid XML document

    XPATH == XML query language, which after you look a few examples it isn't too hard

    SVG == vector graphic format stored in an XML data stream

    XML itself is not hard, but until you figure out how all the many pieces fit together it can be confusing. Another thing to keep in mind is that you don't have to use every piece to make use of XML.

  5. Re:nuts! by CynicTheHedgehog · · Score: 4, Informative
    It's not XML's fault that Microsoft isn't implementing it.


    Are you smoking crack? I hate Microsoft as much as the next guy, but have you seen .NET? Holy cow. Everything having to do with data sets has been XML-ized, from query results to transactions to SOAP...you can't swing a dead cat without writing a schema first. Look at SQL Server 2000...everything can be done in XML. And then ASP.NET is XML-based (using the convention), and lets not forget the .NET app web.config file, which is XML.

    Granted, MS hasn't backported everything to XML (think we'll ever see an XML registry?) but everything going forward has XML tattooed all over it. I happen to love XML, but if anything Microsoft tends toward the zealous side.
  6. Re:nuts! by Kombat · · Score: 4, Informative
    XML is very useful. It's not XML's fault that Microsoft isn't implementing it.

    Ppppppht! *sprays water all over monitor* Microsoft's not "implementing it?" What in the heck do you mean by that? Have you taken a look at anything in the .NET suite lately? The entire system is built on XML. The solution files, project files, assembly manifests, application configuration files, setup binding files - they're all XML! Visual Studio .NET is build extensively on XML, and the .NET API includes some very intuitive and powerful classes for reading, manipulating, and building XML documents. I suggest you do at least a cursory investigation before spouting something so outrageously inaccurate next time.

    --
    Like woodworking? Build your own picture frames.
  7. XML is Verbose...compresses beautifully-- NOT!! by coats · · Score: 4, Informative
    I'm an environmental modeler (think supercomputing) , and most of the time the stuff I generate won't fit into dinky little 2GB files. Model data doesn't compress well (and even if it did, it'd take too many tera-ops). And then, forcing it into a sequential access model is not a good idea.. When you have a 10GB data set, you really need direct access to mine the contents, rather than having to "eat the file whole."

    But bureaucrats being what they are (and bureaucrats being in charge of environmental agencies), they've been told that XML is a GOOD THING, and want to force everything into that mold. And it doesn't fit!

    Call it the "law of the instrument," as someone (Poul Anderson, I think, put it:

    As soon as you invent a new and better type of monkey wrench, you can be sure someone will make use of it -- as a bludgeon!
    That's XML, to a tee!

    --
    "My opinions are my own, and I've got *lots* of them!"