The XML Extender provides functions for storing, retrieving, searching, and updating XML documents, and for extracting XML elements or attributes. Use XML user-defined functions (UDFs) for XML columns, but not for XML collections. All the UDFs have the schema name db2xml, which can be omitted in front of UDFs.
The four types of XML Extender functions are: storage functions, retrieval functions, extracting functions, and an update function.
Table 21 provides a summary of the XML Extender functions.
Table 21. The XML Extender user-defined functions
Type | Function |
---|---|
Storage functions | XMLVarcharFromFile() |
XMLCLOBFromFile() | |
XMLFileFromVarchar() | |
XMLFileFromCLOB() | |
Retrieval functions | Content(): retrieve from XMLFile to a CLOB |
Content(): retrieve from XMLVarchar to an external server file | |
Content(): retrieve from XMLCLOB to an external server file | |
Extracting functions | extractInteger() and extractIntegers() |
extractSmallint() and extractSmallints() | |
extractDouble() and extractDoubles() | |
extractReal() and extractReals() | |
extractChar() and extractChars() | |
extractVarchar() and extractVarchars() | |
extractCLOB() and extractCLOBs() | |
extractDate() and extractDates() | |
extractTime() and extractTimes() | |
extractTimestamp() and extractTimestamps() | |
Update function | Update() |