Database Reference
In-Depth Information
Figure 17.18
Using
UPDATEXML to
Change XML
Documents.
Now let's remove Mozart's single CD from the XML document alto-
gether, as shown in the following script and in Figure 17.19.
SET LONG 2000 WRAP ON LINESIZE 5000;
UPDATE XML SET XML = UPDATEXML(XML, '/Artist//CD', NULL)
WHERE ID = 12;
SELECT X.XML.EXTRACT('/*') FROM XML X WHERE X.ID = 12;
To add Mozart's CD back into the XML document, we can either re-
create from the source tables or update the entire node with the original
XML subtree.
17.3
Metadata Views
This section describes metadata views applicable to XML tables. Chapter
19 examines the basis and detail of Oracle Database metadata views.
USER_XML_TABLES and USER_XML_TAB_COLS . The struc-
ture of XML tables from the perspective of both tables and columns.
Search WWH ::




Custom Search