Representing data from a database as XML

The facilities that enable data to be extracted and then represented as XML offer a range of alternatives. The specimen data stored in the relational database tables shown in Figure H.1 are used to demonstrate these facilities.

FIGURE H.1 Specimen data for XML representation examples

One option is to output the complete contents of a table or a schema into a standard XML structure using a simple mapping. There are two possible approaches to this. The first of these approaches provides a structure that is a valid XML document. Figure H.2 shows the XML obtained when outputting the contents of the employee ...

Get Principles of Data Management now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.