See
Also
The XML import method
processes the row elements of an XML document with their
instructions. The behavior of the import method is determined by
the processing instructions in the XML document and by the
VerifyOriginalValues and UseIOFormats parameters.
·
|
The structure of an XML document to be imported is described in
"XML Representation of Application Data With Processing
Instructions". |
SYNTAX
INVOKE XML.Import
WITH
SELECT [,<value> <param>[,
<value> <param> ...]]
<expression>
XMLDocument
[,<value>
<param>[, <value> <param> ...]]
FROM <table>
NOTE
Value/Parameter pairs and expressions can appear in any order
within the SELECT statement.
EXAMPLE
INVOKE XML.Import WITH SELECT 'yes' useioformats, XMLTEXT XMLDocument FROM t2_
EXPRESSIONS
The possible values for <expression> are:
<column>, OLD(<column>), *,
OLD(*)
PARAMETERS
Parameter names and values are not case-sensitive. See the
examples below for more information.
Parameter
|
Allowed Values
(Default)
|
Description
|
XMLDocument
|
|
This parameter is mandatory.
Contains the XML document that
must be imported.
|
UseIOFormats
|
No,Yes
|
Specifies whether the column values to be imported must be
checked against the IO format of the corresponding domain or
not.
If not, date columns must use
the format described in "XML Representation of Date Values"
|
VerifyOriginalVValues
|
No,
ChangedColumns, AllColumns
|
For row elements with an Update or Delete instruction, this
parameter specifies whether the values in the XML document must be
compared with the database.
This allows optimistic locking
mechanisms and prevents lost updates if different client
applications change the same information concurrently.
|
XmlDeclaration
|
No, Yes
|
Specifies whether the default Rules Engine encoding is to be
returned in XML processing instructions. Otherwise no encoding
processing instruction is added to the returned XML document.
|
NOTE:
If xml-import has only one parameter, this parameter is always
the XML document
VerifyOriginalValues
The values of the VerifyOriginalValues parameter have the
following meaning:
Value
|
Description
|
No (default)
|
No comparison between values in the XML document and the
database.
|
ChangedColumns
|
Before records are deleted, the values mentioned in the XML
document are compared with the column values to be updated in the
database.
Before records are updated,
the values mentioned in the XML document are compared with the
column values to be updated.
|
AllColumns
|
Before records are deleted or updated, the values mentioned in
the XML document are compared with the corresponding column values
in the database.
|
Related Topics
Processing
Instructions for XML Import
Reading from File with XML
Import
Where to Use the XML Import
Method?
How the XML
Import Method Processes Row Elements
The Returning XML Document
Basic XML Formats for Import
Importing
Parent-Child Data with XML Import
Importing Parent-child Data When the Parent Key is a Generated
Value
Example: How to Transform a Parent-Child XML Document to the
Required Import Structure
Example:
Simple XML Import From Application Table
Example:
Direct XML Import Verifying the Original Values
Example:
Constraint Processing an XML Import
|