You can use the default casting functions to convert an XML UDT to the base data type. The XML Extender also provides an overloaded function Content(), which is used for retrieval.
The Content() function provides the following types of retrieval:
You can use Content() to retrieve an XML document to a memory buffer when it is stored as an external server file. You can use Content(): retrieve from XMLFILE to a CLOB for this purpose.
You can also use Content() to retrieve an XML document that is stored inside DB2 and store it to a server file on the DB2 server's file system. The following Content() functions are used to store information on external server files:
The examples in the following section assume you are using the DB2 command shell, in which you do not need to type "DB2" at the beginning of each command.