August 19th, 2005 04:11 PM
Just a discussion about XML...
Opinions are like arses, so you probably have an opinion about XML too.
Well, my opinion... I think XML is very useful as a dataformat to transport data from one location to another. It's biggest power is that it's not just data. It also describes the data it contains. It becomes even more powerful with things like an XML Schema, which can be used to validate the contents of an XML file. Or an XML Stylesheet that can be used to transform XML data to some other data format. And the fun thing is that these schema's and stylesheets are themselves XML files too.
Of course, as a data format, XML is a bit bloated. Especially if you're sending mostly numerical data over. And, as I've noticed, not every language is implementing the XML standard correctly. For example, Delphi 7 has some major problems with booleans and datefields. Simply because they thought XML-boolean would be case-insensitive, which is itsn't, and they have never written anything to write a date field in the proper date format. So my favorite programming tool has a few flaws. But I can work around that. And of course, if all you're sending is just a bunch of large numbers, a binary data format would be way more compact than <list><number index="1">1000</number><number index="2">1002</number>...</list>
However, a binary format would be harder to comprehend for a human reader. Even if you convert it to hexadecimal, something like 02E803EA03 really doesn't make any sense if you don't know it's format. (And yes, it has some format!)
The major problem with XML though is that it's often just abused. I've seen people adding comma-separated lists in an XML field, like: <Items>1,2,3,4,5</Items> And it wouldn't suprise me if people are misusing the format for other purposes too.
And of course many people are just not aware of all the mechanisms that can be used with XML. There is some prejudism about XML too, but in my opinion, it is an useful format.