Forum Moderators: phranque
http://techupdate.zdnet.com/techupdate/stories/main/0,14179,2896005,00.html
Some XML developers are cheating. For one reason or another they are undermining the whole intent of XML by implementing shortcuts. Take the example given in the article:
Some of the techniques are relatively harmless, such as stuffing lots of attributes into elements (for example, <shirt color="red"/> instead of <shirt><color>red</ color></shirt>). This is legal and saves the parser from having to handle several tags, although they also lose some of the hierarchical structure of the data.
In other cases, the author goes on to say, the programmers are rewriting the XML parsers to ignore certain elements like CDATA. Makes parsing that much faster but the parser cannot be trusted to provide valid XML.
The whole point of using XML to begin with is to develop a common way to describe data so that we all understand what is meant when a given term is used. There are a number of organizations that have been working together to define standards for their own industries (one I recommend you read up on is Dublin Core [dublincore.org]).Again, this is legal and I believe encouraged as long as they make their Schemas and/or DTDs freely availabe so the rest of us can utilize thier XML documents. If they don't, then thier work becomes proprietary and the question of why they used XML to begin with comes up. As the author pointed out - the use of CORBA would probably suit them better.
It amazes me that in an industry so full of variables (pun not intended) that more people don't realize the need to follow a common set of guidelines - especially when using XML. As new technologies are built upon XML we will see XML slowly become absorbed into them. If the XML these higher level apps are built upon is questionable then their usefulness is zilch. I for one hate to have to rewrite code that I messed up for one reason or another. And I'll be mad as hell if I ever have to rewrite code because someone else didn't follow the standards and passed off their XML application as using valid XML.
<added>write valid XML and don't mess with the parsers if you intend to let others use your XML apps</added>
<added2>I just reread this post - boy do I sound miffed. I apologize. I'm ranting to no one in particular.</added2>