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.This article explained about the XML document, XSD schema, and how to validate XML document against XSD schema using Microsoft . 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.In our music library example above, catalog is our root element, as it contains all our other elements.
In this way, an XML file itself doesn’t actually do anything.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.The way we'd interpret the plain text file would be dependent on how we designed our own format.No information exists to tell others what the actual data means, its order, or how to parse (read) it in other projects.By contrast, the XML file shows clearly what each piece of information represents and where it belongs in the data hierarchy.