![]() |
|
The XML standard states that an XML document must be well formed, attributes must enclosed in the double or single quotes and character data escaped accordingly. An XML document which does not conform to these constraints is not an XML document and this simple structural validation is carried out by the majority of XML parsers. This is however by no means the be all and end all of XML data validation. Drawing a metaphor to a real world scenario, a well formed XML document is like a well built building. It is structurally sound but if the only requirement is that it is a building, how does one know that the building contains the right rooms, the required number of floors and the correct décor. Business - Click the link on the left to visit our partner sites under business/finance/loan/mortgage category Computers - Click the link on the left to visit our partner sites under computer hardware/software/peripheral category Internet - Click the link on the left to visit our partner sites under webhosting/webdesign/internet marketing category Software - Click the link on the left to visit our partner sites under software category Web Design - Click the link on the left to visit our partner sites under web design/development category Web Hosting - Click the link on the left to visit our partner sites under web hosting category Web Promotion - Click the link on the left to visit our partner sites under search engine optimization/internet marketing category Web Resources - Click the link on the left to visit our partner sites under other web category Recreation - Click the link on the left to visit our partner sites under travel/hotel/cruise category Casino - Click the link on the left to visit our partner sites under online gambling/poker/blackjack/roulette category Health - Click the link on the left to visit our partner sites under online pharmacy/hospital/health category Shopping - Click the link on the left to visit our partner sites under online shopping/gift category Miscellaneous - Click the link on the left to visit our partner sites under all other categories
If the building is not to the correct specification, it may as well be a pile of rubble. Back to XML, being well formed is simply not enough to constitute a valid XML document. You must ensure that the data and elements you need are all present, in the correct order and contain the data you expect. This validation can be carried out at the application level. For example in PHP, the DOM API can be used to validate the document structure. |
Partners |