Chapter 14. Advanced XML Loading Techniques

In this chapter, we apply a combination of techniques learned in previous chapters to build an XMLLoader utility that assists in loading complex XML into multiple tables. We also explore using stylesheets that generate stylesheets for automating the creation of “insert transformations” needed to convert the structure of incoming XML into the canonical ROWSET/ROW format for insertion by the XML SQL utility or an XSQL page with an <xsql.insert.request> tag.

Storing Datagrams in Multiple Tables

We saw in Chapter 12, that collection types can be used with object views to handle the automatic storage of XML datagrams containing nested, repeating information. Note that this technique works for any number of single-level nested collections, but does not work for multilevel nesting of repeating elements. This means that we can use the collection types technique to store <Department> datagrams that contain a nested set of <Employee>s. We can also use that technique to store <Department> datagrams that contain both a nested set of <Employee>s and a nested set of <QuarterlyAudit> entries. In general, any number of single-level repeating elements can be handled with collection types and object views, but if <Department>s contain repeating <Employee>s, and if <Employee>s, in turn, contain repeating <Dependent>s, then the technique no longer applies. This situation results from the limitation in Oracle8i that collection types cannot contain nested ...

Get Building Oracle XML Applications 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.