The XML Extender user-defined types (UDTs) are data
types that are used for XML columns and XML collections. All the UDTs
have the schema name db2xml. The XML Extender creates UDTs for storing
and retrieving XML documents. Table 20 contains an overview of the UDTs.
Table 20. The XML Extender UDTs
User-defined type column | Source data type | Usage description |
---|---|---|
XMLVARCHAR | VARCHAR(varchar_len) | Stores an entire XML document as VARCHAR inside DB2. |
XMLCLOB | CLOB(clob_len) | Stores an entire XML document as character large object (CLOB) inside DB2. |
XMLFILE | VARCHAR(512) | Specifies the file name of the local file server. If XMLFILE is specified for the XML column, then the XML Extender stores the XML document in an external server file. The Text Extender cannot be enabled with XMLFILE. It is your responsibility to ensure integrity between the file content and DB2, as well as the side table created for indexing. |
Where varchar_len and clob_len are specific to the operating system.
For DB2 UDB, varchar_len = 3K and clob_len = 2G.
These UDTs are used only to specify the types of application columns; they do not apply to the side tables that the XML Extender creates.