1. 13
  1.  

  2. 4

    The original sin of XML is that it looks like text but really should be treated as binary.

    A ton of issues with XML (unbalanced tags, mismatched types, escaping) just go away if you’re using a tool that opens the files, does the validation for you and saves them correctly. But those tools were either expensive, or closed source, or not available on all platforms, so people just opened XML files in a text editor and started hacking - “how hard can it be?”

    I’ve personally messed up a production system because the configuration that described dates for holidays was in XML, it was on a Windows system, and I didn’t save it as UTF-16, because I had to use Notepad on the server.

    My first “real job” (and where I started using Perl in earnest) was babysitting an import of XML from one system to another. The reader didn’t handle escaped ampersands correctly, and would just croak in the middle of a multi-day import if one was encountered (it was the late 90s and, yes, Java was involved, why do you ask?). I ended up pre-processing the entire file beforehand, as well as writing expect scripts to restart if anything went wrong. It was fun and rewarding but not a good use of a relatively high-payed consultant’s time. All because the original developer didn’t know their XML.

    1. 3

      A ton of issues with XML (unbalanced tags, mismatched types, escaping) just go away if you’re using a tool that opens the files, does the validation for you and saves them correctly. But those tools were either expensive, or closed source, or not available on all platforms, so people just opened XML files in a text editor and started hacking - “how hard can it be?”

      What parallel universe are you talking about? I like XML and use exclusively free software tools – and enjoy all the ecosystem: schemas, validations, transformations, query language, code completion, globally unique identifiers thanks to namespaces etc.

      1. 7

        He’s talking about the parallel universe of 20+ years ago. Back before there was schema validation and a surplus of open source tools to work with it. Even now though I would choose a binary format over XML any day.

        1. 2

          20+ years ago

          OK then. So I do not feel that old now :-) I started with XML somewhere in 2003 +/- (before that, just some HTML tag soups). And free software libraries like libxml2 or Xerces were born in 1999.

        2. 3

          It was definitely not the case when XML started its infamous march into computing…

      2. 3

        It’s been years since I’ve had to hack on any­thing XML-relat­ed, but a recent project at work has me once again jump­ing into the waters of gen­er­at­ing, pars­ing, and mod­i­fy­ing this 90s-era doc­u­ment for­mat. Most devel­op­ers these days like­ly only know of it as part of the curi­ous­ly-named…

        It is funny how fundamentally different experience software developers may have… However general public usually still see us as an uniform group of weird computer people :-)