Bad, vile and meaningless: XML misuse from Alan's clob

Yet another misuse of XML

The only purpose of existence for this XML message I'm about to describe by example, is to publish two pieces of information: "satu", and its corresponding field "hetu". There is a 1-to-1 mapping between them in both directions. Now, take a look at this:

<SA-HE IDVALUE="30">
    <TIETUETYYPPI TYPE="A" LENGTH="2"
        INITVALUE="30"><![CDATA[30]]></TIETUETYYPPI>
    <SANOMATUNNUS TYPE="A" LENGTH="6"
        INITVALUE="SA-HE"><![CDATA[SA-HE]]></SANOMATUNNUS>
    <VERSIO TYPE="A" LENGTH="2"
        INITVALUE="01"><![CDATA[01]]></VERSIO>
    <TIETOJEN_POIMINTA-AIKA TYPE="A" LENGTH="14">
        <![CDATA[20000502123015]]>
    </TIETOJEN_POIMINTA-AIKA>
    <SAHKOINEN_ASIOINTITUNNUS TYPE="A" LENGTH="9">
        <![CDATA[123456789]]>
    </SAHKOINEN_ASIOINTITUNNUS>
    <HENKILOTUNNUS TYPE="A" LENGTH="11">
        <![CDATA[121212-222Y]]>
    </HENKILOTUNNUS>
    <VARA1 TYPE="A" LENGTH="50"><![CDATA[]]></VARA1>
    <VARA2 TYPE="A" LENGTH="50"><![CDATA[]]></VARA2>
</SA-HE>

This is, unfortunately, a typical example of XML in the world of professional e-commerce. In my position I get to see all sorts of unpleasant gunk that appears to have immediate street credibility just by virtue of being expressed in XML. So, let's itemize some of the things that go wrong here.

This is what happens to a simple idea, after sightless over-engineering and frameworks and platforms for xml delivery have been through with the DTD ("every XML element in the house shall have a type attribute to cooperate with our in-house junk for xmlrpc").

Now, let's see what it really says:

<satu-hetu id="30" version="1">
    <luotu>2000-05-02T12:30:15.0+3</luotu>
    <satu>123456789</satu>
    <hetu>121212-222Y</hetu>
</satu-hetu>

I didn't really even try to make it any better. I just tried to make it suck less. (I'd remove the id, but I might leave the version.) And amazingly, if you look at it, it says exactly the same thing as the other message.

But perhaps that above is simply too frighteningly bare and simple, leaving the designers exposed and naked in the horrifying knowledge that even a random street beggar could make sense of it with just a glance.