The XML parser is responsible for reading an XML document and making sure it complies with the necessary rules. There are two kinds of parsers: non-validating and validating. The non-validating parser is the simpler of the two, and simply checks to see if a document is well-formed. The more complex validating parser will not only check for well-formedness, but also for validity (i.e., that the document actually follows all the rules laid out in an associated DTD).
If the document passes these tests, then the parser breaks it into a
structure called a
document tree. As the name
implies, a document tree is simply a hierarchical data structure
created from the nested elements in the document. The left-hand side
of Figure 9.1 illustrates a typical document tree.
In the next two sections, we’ll see how you can generate XML documents from information stored in the Oracle database. In ...