XML buzzword compliance for the sake of it

Today, whilst skim reading an article for a product, I found myself head in hands, screaming “No, no, no!”. The product in question has a CSV import facility so that you can load up some important data quickly, for example:

IDENTIFIER, NAME, EMAIL
1,Nermal,123@456.com
2,Pooky,789@abc.com

Nothing wrong there, I’m happy with CSV as an import/export mechanism (see KISS principle).

Here’s what got me.

To ensure buzzword compliance, they also have an XML import facility. Here’s an example of what the data would look like in their XML format:

<?xml version="1.0" ?>
<contacts>
  <contact>
    <data>IDENTIFIER</data>
    <data>NAME</data>
    <data>EMAIL</data>
  </contact>
  <contact>
    <data>1</data>
    <data>Nermal</data>
    <data>123@456.com</data>
  </contact>
  <contact>
    <data>2</data>
    <data>Pooky</data>
    <data>789@abc.com</data>
  </contact>
</contacts>

You think that just converting the CSV format and putting some angle brackets around a few things is XML? It’s the fact that the software industry has so many people and organisations like this in it that really gives us a bad name! Sure, the import format isn’t really hurting anyone, and strictly… syntactically… is XML, but why bother, seriously! XML is about so much more than that and the point (whilst incurring the increased effort) has been completely missed.

It’s a little like when you need to interface with a 3rd party system and their system rejects your schema compliant XML because you’ve taken the line breaks out of the data and their bespoke parser barfs! Seriously, that’s happened to me… and unfortunately, it’s not the only example of thoughtless XML usage I have, it’s just one of the most stupid.

Leave a Reply

You must be logged in to post a comment.