Purpose
Extracts the element content or attribute value from an XML document and returns the data as DATE type.
Syntax
Scalar function |
---|
>>-extractDate----(--xmlobj--,--path--)------------------------>< |
Table function |
---|
>>-extractDates----(--xmlobj--,--path--)----------------------->< |
Parameters
Table 36. extractDate and extractDates function parameters
Parameter | Data type | Description |
---|---|---|
xmlobj |
XMLVARCHAR, XMLFILE, or XMLCLOB | The column name. |
path | VARCHAR | The location path of the element or attribute. |
Return type
DATE
Returned column name (table function)
returnedDate
Example
In the following example, the value of ShipDate is extracted as DATE.
SELECT * from table(db2xml.extractDates(Order, ('c:\dxx\samples\xml\getstart.xml'), '/Order/Part/Shipment/ShipDate')) as x;