1. 13
  1.  

  2. 19

    How is the defense of XML not centered around schema validation? I did a good bit of XML & XSLT when I first started out this career, and that’s basically my best memory from it: The ability to check that my stuff conformed to what I had declared. I understand how there’s a great deal of painful stuff to deal with and that’s fine, and there’s plenty of reasons to use other stuff and that’s also fine, but there’s a great deal of work that has been done to reinvent that specific wheel in other formats, and it feels like a waste.

    Might just be nostalgia, but I really feel like that was one of the strong features.

    1. 3

      Schema validation always sounds so much better in theory than it ends up being in practice.

      Second-hand anecdata: There’s a service where I work that needed to produce data in an XML format for consumption by a Third-Party harvester. The developer worked for a while and got the XML output validating against a (standards org specified) schema. Then the third-party harvester tried to consume it, and broke, because their implementation doesn’t fully match the schema, and the contractors take months to turn around fixes, and they claim this isn’t a bug, so could you please just make your output do this instead?

      That’s the most recent iteration of that I’ve seen. I’ve run into it myself in the past, too. There’s schemas, and there’s Real Life Implementations, and never the twain shall meet.

      1. 2

        I’ve got firsthand experience with schema validation using good old fashioned XSD schema, and they were really quite usable and useful.

        I think many people’s frustrations with XML center around the varying quality of XML parsing libraries. If you’re using a really nice parser, it drives like a Cadillac.

    2. 7

      Notice how the example avoids using namespaces or schema. It doesn’t even have an XML header, which I believe would lead many parsing libraries to regard it as invalid.

      There are good parts of XML, but the ratio of bad:good in what was standardized is too high.

      1. 1

        Certainly I agree that one can do XML badly…..

        But even if you do it well there is this huge impedance mismatch that is worse than even the object relational mismatch.

        As a programmer you have in your hands certain primitive datatypes…. and you look at XML and wonder which sod was so divorced from my reality came up with XML?

        1. 1

          What bothered me with validation is I could not find XSD 1.1 support which let me use xs:any with xs:all so I could validate the data I received whilst not caring if my peer added extra information in a backwards compatible manner.

          Ended up just using SAX.