IBM Books

XML Extender Administration and Programming

XMLVarcharFromFile()

Purpose

Reads an XML document from a server file and returns the document as an XMLVARCHAR type.

Syntax
XMLVarcharFromFile
>>-XMLVarcharFromFile--(--fileName--)--------------------------><
 

Parameters

Table 22. XMLVarcharFromFile parameter
Parameter Data type Description
fileName VARCHAR(512) The fully qualified server file name.

Return type

XMLVARCHAR

Example

The following example reads an XML document from a server file and inserts it into an XML column as an XMLVARCHAR type.

EXEC SQL INSERT INTO sales_tab(ID, NAME, ORDER)
   VALUES('1234', 'Sriram Srinivasan',
           XMLVarcharFromFile('c:\dxx\samples\cmd\getstart.xml'))

In this example, a record is inserted into the SALES_TAB table. The function XMLVarcharFromFile() imports the XML document from a file into DB2 and stores it as a XMLVARCHAR.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]