Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Solution Area

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Using XML-SQL Utility (XSU), 14 of 26


Storing XML

Now that we have seen how queries can be converted to XML, let see how we can put the XML back into the tables or views using the utility. The class oracle.xml.sql.dml.OracleXMLSave provides such functionality. It provides methods to insert the XML into tables, update existing tables with the XML document and to delete rows from the table based on the XML element values.

In all these cases the given XML document is parsed, the elements examined to match the tag names to those of the column names in the target table or view. The elements are then converted to the SQL types and then bound to the appropriate statement. The process and options for storing XML using the XSU are shown in Figure 4-5.

Figure 4-5 Storing XML in the Database Using the XML-SQL Utility: Process and Options


The document is assumed to contain a list of ROW elements each of which constitute a separate DML operation, namely, insert, update or delete on the table or view.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Solution Area

Contents

Index