Accessing the elements of stored XML order documents

We have created a table named order_docs with a column named order_doc. The datatype of the order_doc column is OrderXml, a Java class that contains an XML Order document.

The OrderXml class contains several instance methods that let you reference and update elements of the XML Order document. They are described in “The OrderXml class for order documents”.

This section uses these methods to update the order document.

<?xml version="1.0"?>
<!DOCTYPE Order SYSTEM  "Order.dtd">
   <CustomerName>Acme Alpha</CustomerName>
       <ItemId> 987</ItemId>
    </Item>	<Item> 
       <Quantity unit="12">3</Quantity>
    </Item>	<Item> 

Each XML Order document has exactly one Date, CustomerId, and CustomerName, and zero or more Items, each of which has an ItemId, ItemName, and Quantity.