The figure shows an Oracle Database containing Oracle XML DB and XMLType tables, columns, and views. Using JDBC, an Oracle XML DB XMLType instance is created. Using the getDOM() method and the Java DOM API, the XML DOM tree is created. The changed XML data is then saved back to the database.

This flow in the figure is described as follows: The Java DOM API for XMLType calling sequence description assumes that your XML data is preregistered with an XML schema and that it is stored in an XMLType data type column. To use the Java DOM API for XMLType, follow these steps:

  1. Retrieve the XML data from the XMLType table or XMLType column in the table. When you fetch XML data, Oracle creates an instance of an XMLType. You can then use the getDom() method to retrieve a Document instance. You can then manipulate elements in the DOM tree using Java DOM API for XMLType.

  2. Use the Java DOM API for XMLType to perform operations and manipulations on elements of the DOM tree.

  3. The XMLType holds the modified data, but the data is sent back using a JDBC update.