Xmlreader xmlvalidatingreader

Rated 4.78/5 based on 657 customer reviews

The structure of the catalogue is such that it contains CDs, which in turn contain tracks.This is our hierarchy, and will be important later, when we need to parse the document.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.

xmlreader xmlvalidatingreader-62

But, as the consumers of these files, how can we differentiate between them? An XML namespace allows us to qualify an element in the same way as telephone area codes qualify phone numbers.

In this way, an XML file itself doesn’t actually do anything.

It doesn’t say how to display the data or what to do with data, just as a text file doesn’t.

For example, the track "Street Spirit" corresponds to the CD "The Bends," just as the track "Last Nite" corresponds to the CD "Is This It?

" If we didn't use a suitable hierarchy, we wouldn't be able to ascertain this during parsing.

Leave a Reply