Using the XML Extender, you can retrieve either an entire document or the contents of elements and attributes. When you retrieve an XML column directly, the XML Extender returns the UDT as the column type. For details on retrieving data, see the following sections:
The XML Extender provides two methods for retrieving data: default
casting functions and the Content() overloaded UDF. Table 11 shows when to use each method.
Table 11. The XML Extender retrieval functions
XML type | Retrieve from DB2 as... | ||
---|---|---|---|
VARCHAR | CLOB | FILE | |
XMLVARCHAR | VARCHAR | N/A | Content() |
XMLCLOB | N/A | XMLCLOB | Content() |
XMLFILE | N/A | Content() | FILE |