Validation of xml with xmlvalidatingreader example
XML validation is the process of checking a document written in XML (e Xtensible Markup Language) to confirm that it is both well-formed and also "valid" in that it follows a defined structure.A well-formed document follows the basic syntactic rules of XML, which are the same for all XML documents. It contains a reference to an XSD file, which you will also need to copy from below or download and enter into the webpage (in a second step, when you are prompted for it) to see the validation results.One of the most exciting recent advances in computing has been XML. Before we look into the specifics of XML, it is important to know why XML exists and where it can be used.
But XML crucially differs from plain text in that it allows you to structure your data in a standard manner.This is important — it means that other systems can interpret your XML, which is not as easily achievable in plain text.This describes what is meant by "interoperable file format" — once you produce an XML file, it is open to everyone.An input, and all the information required to understand the structure of your data, is included in the file. Here’s a text file and an XML file that both store the same information: Notice how the subject of our data is defined in the XML file.We can see clearly that there is a catalogue containing CDs, each of which contains some tracks (music aficionados will notice that I have cut down the track listings for space! You can also see that XML can be less efficient than some other file formats.
Yet, in many cases, the loss in efficiency that results from the increased size can be made up by the speed of processing a well-defined XML file, as parsers (programs that read XML) can predict the structure.