Purpose
Reads an XML document from a server file and returns the document as an XMLCLOB type.
Syntax
XMLCLOBFromFile |
---|
>>-XMLCLOBFromFile--(--fileName--)----------------------------->< |
Parameters
Table 23. XMLCLOBFromFile parameter
Parameter | Data type | Description |
---|---|---|
fileName | VARCHAR(512) | The fully qualified server file name. |
Return type
XMLCLOB as LOCATOR
Example
The following example reads an XML document from a server file and inserts it into an XML column as an XMLCLOB type.
EXEC SQL INSERT INTO sales_tab(ID, NAME, ORDER) VALUES('1234', 'Sriram Srinivasan', XMLCLOBFromFile('c:\dxx\samples\cmd\getstart.xml'))
The column ORDER in the SALES_TAB table is defined as an XMLCLOB type. The preceding example shows how the column ORDER is inserted into the SALES_TAB table.