Re: XML: The good, the bad, and the ugly

From: Bernard Peek <bap_at_shrdlu.com>
Date: Sat, 09 Oct 2004 12:00:31 GMT
Message-ID: <1ZNdqeJNo8ZBFwxf_at_shrdlu.com>


In message <a2jcm015pihgtvd6ivne489or1ges4vsf2_at_4ax.com>, Lemming <thiswillbounce_at_bumblbee.demon.co.uk> writes
>On Thu, 07 Oct 2004 21:57:16 GMT, Bernard Peek <bap_at_shrdlu.com> wrote:
>
>>In message <cjsldr$vui$1_at_news.netins.net>, Dawn M. Wolthuis
>><dwolt_at_tincat-group.comREMOVE> writes
>>
>>
>>>XML isn't brain surgery, but it is likely to make a significant impact that
>>>really does advance the state of B2B software
>>
>>I've used XML in a situation where it did provide real benefits. When
>>the received data failed to validate it got bounced by the machine and
>>never even reached a human. At a stroke that ended most of the arguments
>>about whose job it was to fix malformed data files.
>
>There shouldn't really be an argument about it.

I have the same opinion about that, however in a real world situations my opinion might not have carried enough weight.

> If the data file is
>invalid (whatever format it's in) it's the responsibility of the
>creator of the file to fix it. A receiving system can't reasonably be
>expected to guess what the data should have said.

Unless the receiving system is a human being. In which case the originator of the file is quite likely to be of the opinion that the receiver should use "common sense" to interpret the data. In that situation responsibilities are unclear and there is scope for heated arguments and misunderstandings.

>
>Having said that, I guess it's easier to spot certain types of
>malformed XML, simply because the structure of the data is made
>explicit in the file in the form of tags. OTOH the malformation is in
>XML itself; If the XML validates, that says nothing about the quality
>of the data within it.

Very true, although it is possible to use XML to detect some data errors. It's not perfect but I'll take all of the help I can get.

> The point is you still have to write exactly
>the same validation routines that you would have had to write if the
>file was delivered in a flat file, csv or even in a deck of cards, but
>with the additional overhead that when using XML you also have to
>validate the delivery medium.

That's a feature not a bug. If the medium fails to validate then you know that the originator has made a mistake even before you have looked at the data itself. XML validation is unforgiving and merciless. When I am receiving data that is precisely what I want.

-- 
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.
Received on Sat Oct 09 2004 - 14:00:31 CEST

Original text of this message