DML instruction tags |
In a table section, table elements represent database records. A table element is allowed to have an optional DML instruction tag. This is an explicit instruction to XML.Import about what to do with the record on import (See "Meaning of DML instruction tags" in this help topic). DML (Data Manipulation Language) is an abbreviation from the SQL specification. Syntax
The element name must be "Insert", "Update", or "Delete". In the case of "Insert" and "Delete", the element must be empty. To import an XML document with DML instruction tags, you must specify relationship-behaviour="as-reference" in the usoft-xml processing instruction. Otherwise, it's an error. In the case of "Update": •The Update element must have one or more attributes in which the attribute name identifies a changed column, and the attribute value the new column value. •The parent element may optionally contain attributes for non-primary-key values. This way, the document is able to contain the old values of the changed columns. Example INSERT
Example UPDATE The ID attribute of the PERSON element is required. It identifies the record to be updated by its primary key.
Example DELETE
Meaning of DML instruction tagsA USoft XML document is allowed to contain a mixture of elements with DML instruction tags and other elements without. On import, each element is considered separately. The sections below describe what happens in each case. "Primary key" in each case is the primary key described by one or more column values in the parent element. The parent element has the same name as the database table.
See also
|