GET_XML_FILE

The GET_XML_FILE function returns the data from a source stream file or a source physical file.

Read syntax diagramSkip visual syntax diagramGET_XML_FILE( string-expression)
string-expression
The argument must be a string expression that specifies a path and file name. The file name may be a name of a source stream file or a source physical file. For a source physical file, the string must be in the form 'library/file(member)'.

The result of the function is a BLOB locator.

The function will read the file specified by the argument and convert the data to UTF-8. If the file does not contains an XML declaration, one will be added. It will return it as a BLOB locator. The function must be run under commitment control. The locator will be freed when a COMMIT or ROLLBACK is performed.

Examples

Register an XML schema document in the XSR registry where the XML schema is in a source stream file.

CALL XSR_REGISTER ('myschemalib', 'myschema', NULL,
                    GET_XML_FILE('/home/XML/MySchema.XSD'), NULL)