The link I send You tells how to retrieve content and values of elements and attributes from xmlobj. The xmlobj can be XMLVARCHAR, XMLCLOB or XMLFILE. So you can use this function with yours xmlclob-type column. The syntax is:
db2xml.extractretrieved_datatype(xmlobj, path)
Where:
retrieved_datatype
Is the data type that is returned from the extracting function; it can be one of the following types:
* INTEGER
* SMALLINT
* DOUBLE
* REAL
* CHAR
* VARCHAR
* CLOB
* DATE
* TIME
* TIMESTAMP
* FILE
xmlobj
Is the name of the XML column from which the element or attribute is to be extracted. This column must be defined as one of the following XML user-defined types:
* XMLVARCHAR
* XMLCLOB as LOCATOR
* XMLFILE
path
Is the location path of the element or attribute in the XML document (such as /Order/Customer/Name). See Location path for location path syntax.
EXAMPLE:
SELECT db2xml.extractVarchar(Order, '/Order/Customer/Name') from sales_order_view
In this example, the extracting UDF retrieves the element <customer> from the column ORDER as a VARCHAR data type. The location path is /Order/Customer/Name.
(I have used this succesfully with my db2 7.2 udb Linux)
Hope this help you
Quote:
Originally posted by thava
I have done it but not for any help. It only describe how we can retrive informasjon that stored in XMLFILE data type.
|