Purpose
Extracts the element content or attribute value from an XML document and returns the data as REAL type.
Syntax
Scalar function |
---|
>>-extractReal----(--xmlobj--,--path--)------------------------>< |
Table function |
---|
>>-extractReals----(--xmlobj--,--path--)----------------------->< |
Parameters
Table 32. extractReal and extractReals 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
REAL
Returned column name (table function)
returnedReal
Example
In the following example, the value of Tax is extracted as a REAL.
SELECT * from table(db2xml.extractReals(Order, ('c:\dxx\samples\xml\getstart.xml'), '/Order/Part/Tax')) as x;