This is actually a serious question - it has bothered me for years.
What is the purpose of XML, RSS, ATOM - and whatever other initials someone wants to throw at it.
I do not get it, never have - do not think I ever will.
Any data distributed as mark up such as those mentioned above is not intended to be read by a human - which is the only reason I can think of that we would use such bloated methods.
Just grabbed this from google's RSS -
RSS is not all that bad in comparrision to a lot of data delivered by XML. Irregardless - if I pull in 100 items - why do I need that above 100 times?
And as I said - thats not bad - I have seen so many XML data feeds of one type or another that the mark up is 75-90% of the feed - I deal in sports - and you get
How is that any better than a delimited format - which takes nothing to put together - you use the first line to name you fields - and then start rocking on the data - and in cases like something like RSS - your first line is the intro field names - second line is intro data - third line is the data field names - fourth.... to whatever is the data
Any fancy, cool, whatever data processing that we get automatically from XML with programming tools could just as easily - actually - more easily - be written to work with a common delimited format. In essense - that is all any markup langauge is anyway - a delimited format - just with long, descriptive delimiters - that are not as easily to work with cause they are never the same from one XML doc to the next.
To make it even more ridiculous to me - if we are going to pass data around, and be, well I have to say it - dumb enough to spell out what each and every little piece of data is each and every time it appears - then why do we not just send it out like
Which could then be read straight into any programming language and be read to use
(yes the are not php variables - but you wouldnt really want to have the need to remove anything and - as it is with the above you would have to modify [1] with regex into (1) for some languages - and for php it would be as billionth of a second job to front end it with
Now I am not saying that should be the way its done - I do not think is - but I think it makes a heck of a lot more sense than XML
I just do not see any advantage what so ever over a simple CSV that has been around for longer than I have been alive (though I prefer "|", over a comma) - I see no advantage to XML over the simpliest - and lightest weight format - that has existed for years - there is no evolving standard for - because - how standardized can it get - its delimited
I do understand the need for standarized data field names, and data types expected in the data - but there is no reason that can not be done in delimited format - in fact - it is done.
So, someone please tell me exactly why we need XML - what advantage does it have - that I have not already mentioned - and remember - the fact that the tools work well with it is not an issue - they can work well with any data format if written to do so.
What is the purpose of XML, RSS, ATOM - and whatever other initials someone wants to throw at it.
I do not get it, never have - do not think I ever will.
Any data distributed as mark up such as those mentioned above is not intended to be read by a human - which is the only reason I can think of that we would use such bloated methods.
Just grabbed this from google's RSS -
Code:
<item> <title></title> <link></link> <guid isPermaLink="false"></guid> <pubDate></pubDate> <description></description> </item>
And as I said - thats not bad - I have seen so many XML data feeds of one type or another that the mark up is 75-90% of the feed - I deal in sports - and you get
Code:
<player firstname="bob" lastname="jones" hrs="4" rbi="44" runs="33" hit="103" teamcode="1" teamnickname="cubs" teamcity="chicago" leaguecode="1" divisioncode="1" longformdivisionname="National League Central" shortformdivisionname="NLC" longform.......etc etc etc - repeated for up to a thousand players. (and this line would be about 5x this size, actually more like 10x)...throws="r" bats="s" birthday="4" birthmonth="January" birthyear="1965" birthcountry="Swaziland" drafted="none" ......... etc again >
How is that any better than a delimited format - which takes nothing to put together - you use the first line to name you fields - and then start rocking on the data - and in cases like something like RSS - your first line is the intro field names - second line is intro data - third line is the data field names - fourth.... to whatever is the data
Any fancy, cool, whatever data processing that we get automatically from XML with programming tools could just as easily - actually - more easily - be written to work with a common delimited format. In essense - that is all any markup langauge is anyway - a delimited format - just with long, descriptive delimiters - that are not as easily to work with cause they are never the same from one XML doc to the next.
To make it even more ridiculous to me - if we are going to pass data around, and be, well I have to say it - dumb enough to spell out what each and every little piece of data is each and every time it appears - then why do we not just send it out like
Code:
firstname[1]="bob" lastname[1]="jones" hrs[1]="4" ... variablename[1]="variablevalue"
(yes the are not php variables - but you wouldnt really want to have the need to remove anything and - as it is with the above you would have to modify [1] with regex into (1) for some languages - and for php it would be as billionth of a second job to front end it with
PHP Code:
<?
$data=file("feed.txt");
for ($i=0;$i<count($data);$i++)
$data[$i]="\$".trim($data[$i]).";";
$ndata=implode($data,"\n");
striptags, eregi_replace("([^a-z0-9...etc],htmlentities - for any security need
eval($ndata);
?>
I just do not see any advantage what so ever over a simple CSV that has been around for longer than I have been alive (though I prefer "|", over a comma) - I see no advantage to XML over the simpliest - and lightest weight format - that has existed for years - there is no evolving standard for - because - how standardized can it get - its delimited

I do understand the need for standarized data field names, and data types expected in the data - but there is no reason that can not be done in delimited format - in fact - it is done.
So, someone please tell me exactly why we need XML - what advantage does it have - that I have not already mentioned - and remember - the fact that the tools work well with it is not an issue - they can work well with any data format if written to do so.
Comment