qc
6/29/99
1:04 PM
Page 65
Note
Readers familiar with database theory may recognize XMLs model as essentially a
hierarchical database, and consequently recognize that it shares all the disadvantages (and a few advantages) of that data model. There are certainly times when a
table-based relational approach makes more sense. This example certainly looks
like one of those times. However, XML doesnt follow a relational model.
On the other hand, it is completely possible to store the actual data in multiple
tables in a relational database, then generate the XML on the fly. Indeed, the larger
examples on the CD-ROM were created in that fashion. This enables one set of
data to be presented in multiple formats. Transforming the data with style sheets
provides still more possible views of the data.
Every good XML document (where the word good has a very specific meaning to be
discussed in the next chapter) must have a root element. This is an element that
completely contains all other elements of the document. The root elements start
65