XML Extender Administration and Programming
When using XML columns, you store an entire XML document as column
data. This access and storage method allows you to keep the XML
document intact, while giving you the ability to index and search the
document, retrieve data from the document, and update the document. An
XML column contains XML documents in their native format in DB2 as column
data. After you enable a database for XML, the following user-defined
types (UDTs) are available for your use:
- XMLCLOB
- XML document content that is stored as a character large object (CLOB) in
DB2
- XMLVARCHAR
- XML document content that is stored as a VARCHAR in DB2
- XMLFile
- XML document that is stored in a file on a local file system
You can create or alter application tables using XML UDTs as column data
types. These tables are known as XML tables. To learn how to
create or alter a table for XML, see Creating or altering an XML table.
After you enable a column for XML, you can begin managing the contents of
the XML column. After the XML column is created, you can perform the
following management tasks:
- Store XML documents in DB2
- Retrieve XML data or documents from DB2
- Update XML documents
- Delete XML data or documents
To perform these tasks, you can use two methods:
- Default casting functions, which convert the SQL base type to
the XML UDT
- XML Extender-provided user-defined functions (UDFs)
This book describes both methods for each task.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]