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 the first, we'll develop a package to build an XML invoice. In the second, we'll look at a set of experimental packages that you can use to build a variety of XML applications.
Copyright (c) 2000 O'Reilly & Associates. All rights reserved.