Slashdot Mirror


Tim Bray on the Birth of XML, 10 Years Later

lazyguyuk writes "Tim Bray posts a lengthy blog on the birth of XML, formalized as 1.0 in Feb 1998. 'XML is ten years old today. It feels like yesterday, or a lifetime. I wrote this that year (1998). It's really long. The title was originally Good Luck and Internet Plumbing but the filename was "XML-People" and I decided I liked that better. I never got around to publishing it, so why not now?'"

22 of 260 comments (clear)

  1. XML and Interfaces by PIPBoy3000 · · Score: 2, Insightful

    I realize the XML is used for a lot of things, but whenever my fellow developers learn that the vendor is shipping us some interface in XML, the groans are audible. About half the time, their XML format isn't quite standard, and we've got to dig around for utilities to try and work with it (or write something custom). I'd say the vast majority of our interfaces are good ol' delimited text files.

    For other purposes, XML is great and very readable, but I'm not sure it makes sense to use it everywhere.

  2. Java and XML, bad tastes that are worse together by Omnifarious · · Score: 4, Insightful

    I've recently taken a job at a primarily Java shop. After seeing XML used and abused for ant, maven and various other things I've grown even more disenchanted with it. And now I've also gotten the chance to see that not only does Java represent a poor trade off between the annoyances of a strongly typed language and the speed of a dynamic interpreted one, it has a horrible mess of dependency issues that nobody really solves besides.

    I'm much more hopeful about technologies like Thrift and/or D-Bus than I ever was about such abysmal abominations as SOAP, or the only slightly better XML-RPC.

    The Java XML world seems like this little closed ecology of mutual masturbators who all come up with more Java and XML 'solutions' to problems that never existed before they started using Java and XML.

    I see the value of XML for long-lived documents that don't spend a lot of their life on the wire. And possibly for config files, though IMHO it is too ugly and unreadable for those. But as a general tool for Internet plumbing it's awful.

  3. Java and XML - Addendum by Omnifarious · · Score: 3, Insightful

    And, of course, my post is incomplete with reference to my little rant on why CORBA and other forms of RPC are bad. Both Thrift and D-BUS are pretty close to the ideal solution I describe later. They focus on message content over semantics and are extremely easy to parse. SOAP and XML-RPC fail on both of those counts. They are about semantics (you are making a remote function call that does some specific thing, not sending a hunk of data that has some particular content) over content and they are a huge pain to parse.

    1. Re:Java and XML - Addendum by Omnifarious · · Score: 4, Insightful

      CORBA is a minor pain to parse. From what I could tell you could just sit down with a spec and code up your own parser for ye-old random language in a day or two. But that's not my major issue with it.

      My major issue with it was that it promotes designing distributed systems that focus on the semantic roles of the participants instead of the data moving around. In fact it discourages programmers using it from even thinking of what they're doing as sending messages to some system many milliseconds away. Among other evils this leads to all kinds of interesting issues with threading and concurrency that didn't even have to exist.

  4. Re:Classic by smittyoneeach · · Score: 5, Insightful

    In defense of XML, the parsing problem is handled.
    Best wishes on solving the semantic snarls.
    XML, like all good approaches, handles mechanism, not policy.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  5. YAML and JSON by goombah99 · · Score: 2, Insightful
    I'm perpetually surprised every-time I see a new implementation of XML. For example, macintosh plists, many of which replace older ad hoc Unix configs, are in XML. Why oh why do people use XML for data centric, quasi-human readable configuration files when YAML is the ideal solution for this. And for web usage, where perl, python, and ruby abound, why would would people not use YAML since it's so easy to parse with just regular expressions, and because you don't have to instantiate the multi-megabyte structured data entire file just to grep out one record. And in the day of java script and web 2.0, there's JSON. So why does this ponderous obsolete dinosaur XML persist.

    Perhaps I'm being too negative here. I sound like a troll. But really folks, do yourself and the rest of us a favor and read up on JSON and YAML. You''ll see I'm being only too kind and generous to YAML.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:YAML and JSON by ral8158 · · Score: 2, Insightful

      Actually, OS X uses plists because XML, which is more widely known than YAML and much easier to learn, is built directly into the Cocoa API.

      Using an XML file basically consists of the following code:
      NSError xmlError = [[NSError alloc] init];
      NSXMLDocument doc = [[NSXMLDocument alloc] initWithContentsofURL:@"Put your URL here" options:NSXMLDocumentTidyXML error:&xmlError]; //Handle errors around here

      Then you can basically do anything with your doc object. You can insert a child at a certain index, you can ask it for the root element, you can set the DTD to something else, you can apply XSLT to get transformed XML or HTML markup back, you can validate it against its DTD, you can delete children at a certain index, etc. All of these actions take one line. It's a really beautiful, simple system. YAML is... not.

    2. Re:YAML and JSON by fireboy1919 · · Score: 2, Insightful

      In other words, it can not replace XML

      That's pretty much completely wrong. YAML's functionality is a superset of XMLs while being easier to read & understand (because the *basic* usage of it is exactly the same as XML's, but with a simpler syntax). It just hasn't been adopted anywhere except configuration because that's the easiest niche to move into.

      it's just another syntax to learn.

      That's a stupid thing to say. Anybody that can't learn the syntax of either XML or YAML in less than five minutes shouldn't be working with either of them. They're both ridiculously simple to understand.

      It needs a completely new infrastructure: new parsers, new editors, new schema description language, new translation languages and so on.

      That is true, and probably the reason we won't be moving to YAML for quite a while.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
    3. Re:YAML and JSON by msuarezalvarez · · Score: 2, Insightful

      I've never understood why people complain about XML as you do.

      Are you generating XML by hand in your applications? Are you not parsing it using some standard library into an abstract tree or using a standard library to transform XML documents into sequences of events, in exactly the same way lex tokenizes a string of characters? Are you generating it by concatenating strings?

      SOAP is complicated, but that has nothing to do with XML.

      XML does exactly one thing: it allows you to pretend that data is provided to you in the form of an abstract data structure instead of as a sequence of bytes, taking care of encoding issues, namespacing, and what not---assuming, of course, that you are using proper tools. How is that bad?

  6. Here, let me fix that for you ... by trolltalk.com · · Score: 4, Insightful

    If everyone would just use one of the already written XML producers or parsers (the big ones, the ones that work) life would be much easier around here from time to time.
    If everyone would just went back to using simple delimited ascii text life would be much easier around here.

    1. Re:Here, let me fix that for you ... by kyz · · Score: 5, Insightful

      I have, and I can tell you that it's a waste of time.

      It amazes me how something that looks so simple can have so many corner cases, and how they can be solved so differently by different implementations.

      CSV is fine if you want to store data that has no quote marks, commas, carriage returns or linefeeds. For everything else, please use a better specified format, preferably one that has a formal definition. Like XML, for example.

      --
      Does my bum look big in this?
    2. Re:Here, let me fix that for you ... by CaptainPinko · · Score: 3, Insightful

      ASCII doesn't even support the letters needed by the majority of the world's language.

      --
      Your CPU is not doing anything else, at least do something.
  7. Re:Java and XML, bad tastes that are worse togethe by bckrispi · · Score: 4, Insightful

    I'll take an Ant XML build file over an "is that a tab or a space" Makefile any day...

    --
    Xenon, where's my money? -Borno
  8. Your comments seem tainted with inexperience. by sidragon.net · · Score: 3, Insightful

    In general, if you have data to be structured and serialized, XML is one way to do it. If you think XML a poor choice, then could you suggest an alternative? Incidentally, that suggestion should not imply that everyone reinvent their own formats (again).

    [N]ot only does Java represent a poor trade off between the annoyances of a strongly typed language and the speed of a dynamic interpreted one ...

    Would you provide evidence aside from personal anecdotes, and possibly consider evidence to the contrary?

    [Java] has a horrible mess of dependency issues that nobody really solves besides.

    Perhaps you meant “modern software” instead. Any complex application these days relies on dozens of libraries and services to perform tasks. Not quite sure where exactly you are having difficulties, so I cannot elaborate further.

    [XML] is too ugly and unreadable ... But as a general tool for Internet plumbing it's awful.

    XML is intended for consumption by machines first, people second. You might also argue that in-memory data structures are ugly and unreadable.

  9. Re:XML was formalized? by Jerf · · Score: 4, Insightful

    Yes. XML was formalized. It is strictly defined and easy to check for compliance (with the right tools). Only a little bit of the definition has passed out of common usage, mostly focused around DTDs.

    If you encounter a file that claims to be XML, but does not meet the XML standard, then it is not the XML standard that is to blame. The claim is wrong and the file is not XML.

    XML is not a fuzzy-wuzzy adjective that can be applied willy-nilly to anything and magically turn it into "XML". It is not a marketing term or English Professor term. It is a rigidly specified engineer term for a document format, and a given document is XML if and only if it meets that format.

    If someone wants to hack together a half-assed parser or emitter of any language, they will. I've seen half-assed XML parsers, I've seen half-assed JSON parsers, I've seen half-assed HTML parsers, I've seen half-assed YAML parsers, I've seen ... you get the idea. If a standard can't solve the problem, you can't count the lack of solution against it.

  10. Re:Classic by oyenstikker · · Score: 4, Insightful

    There are only a few problems with this:
    1) Non-ancestor relationships and references (i.e., having the same node as multiple locations in the XML document) are not covered by XML, but are possible with objects.
    You can with refids and keys.

    but with a more effecient format (binary)
    It is wonderful to be able to easily read and edit the data in a text editor. If you want it more compact for storage and transmission, compress it. I understand that a binary format could lead to more efficient processing and parsing, but I think the benefits of readable text outweigh the efficiency.
    --
    The masses are the crack whores of religion.
  11. Re:Why is editing XHTML "doing it wrong"? by colmore · · Score: 2, Insightful

    xhtml is one very small dialect of xml.

    when you are entering html style markup tags, you are using xml. but xml is a much much larger subject than that. hand editing a website is fine. (if the documents are getting huge, it should be split into smaller files and automated somehow, anyway) hand editing, say, Open Office's xml format or any of the fairly arcane XMl formats used for interprocess communication.

    XML is sort of designed to be the second best data format for any application. There are a lot of times when something like /etc/passwd is more legible and appropriate. And there are times when the volume of data requires binary. XML is good because it is widely known and when the originating application is lost, the data can still be (with moderate difficulty) understood.

    It's very similar to Java really. It got hyped for a specific web use that didn't really materialize, but it's ability to be generic, widely-spoken, and safety-checked means it has found widespread use across the entire computer industry in places that aren't quite as visible to end-users as simple web application or document formats.

    --
    In Capitalist America, bank robs you!
  12. Re:Classic by Flambergius · · Score: 3, Insightful

    To me that says that XML handles a problem that wasn't there. Parsing problem for pretty much everything is almost universally solved by regex...

    XML doesn't handle parsing. XML makes parsing easier; in fact so easy that parsing XML isn't a problem anymore.

    For an expert, I think XML and regex are complementary techniques. For anyone other than an expert regex are way too brittle. Ordinary people need to be able to operate on their data, it can't require voodoo. (Not that XML in all its arcane application is anything close to plain English, but it's much better than custom data formats and regex.)

    --
    Computers are useless. They can only give you answers - Pablo Picasso
  13. Re:10 Years and still waiting by iamacat · · Score: 3, Insightful

    Here is another obvious rules: If a computer, at any time at all, has to parse or generate XML in large amounts, you are doing it wrong. There is really no need to resend the same string 100000 times, encode multi-megabyte binary data as BASE64 or lose floating point precision by encoding to or from strings. If need be, an efficient binary format can represent the data with an arbitrary schema. Communicating parties can exchange their schemas at runtime and avoid sending attributes that the other end is not going to use.

  14. Re:Regex by the-matt-mobile · · Score: 2, Insightful

    How is this insightful? Yes, from a strictly comp-sci definition of a "regular expression", you are exactly right. But this is not a comp-sci class and this is not a theory lesson! In the real world where real programmers write real (crappy) code, a parser that parses only regular languages is not very useful. All modern regex parsers handle more than just regular expressions - back referencing, depth parsing, lookahead/lookbehind are all common features of modern regex engines that violate the rules of parsing a "regular language" using a simple memory-less DFA/PDA state machine. Real regex parsers use (GASP) *memory* to do their parsing. So, while you wallow in semantics and theory, people are out there are doing real (and granted silly) things with regex parsers because they can. For the purpose of this discussion, the original poster is right that it is possible (through incredibly unholy) to determine well-formed-ness of XML via a modern regex parser even through XML is not a regular language.

  15. Re:10 Years and still waiting by David+Gerard · · Score: 2, Insightful

    It Depends. We have systems that are arranged in a long content chain. One machine sends data to the next machine, maybe by pull, maybe by push. Next machine does ... something ... with it, passes it to next machines. Maybe the developers talk to each other, or remember why their predecessor made the system do that, or maybe they don't. XML is really Just The Thing for the job. And the fact that it can be tweaked by a human (e.g. the sysadmin who has to fix a broken thing) is fantastically useful.

    --
    http://rocknerd.co.uk
  16. Re:Java and XML, bad tastes that are worse togethe by Omnifarious · · Score: 2, Insightful

    The answer to one particular parsing stupidity is not to introduce a different, altogether different set of parsing stupidities to fix it. XML is not a programming language, and making it into one is a pretty distressing and contorted thing to do.