usoft-xml processing instruction

Previous Next

Gives instructions to XML.Import for handling the import of records from a USoft XML document:

A usoft-xml processing instruction is optional in a single-table XML document.

A usoft-xml processing instruction is required in a multi-table XML document.

Syntax

<?usoft-xml action="value", attribute="value", attribute="value"... ?>

The action attribute is required. Other procession instruction (PI) attributes are optional. If a PI attribute is not supplied, handling is as if it was supplied with its default value. PI attributes and their default values are discussed in the table below.

 

Example

<?usoft-xml version="1.0" action="multi-tables-import" use-io-formats="no" 
  verify-original-values="no" return-corrected-records ="yes"?>
<MultiImport>
  <Employees documentName =" Employees">
    <EMPLOYEE ID="1" NAME="SMITH"/>
  </Employees>
  <Departments documentName ="Departments">
    <DEPARTMENT ID="1" NAME="CON"/>
  </Departments >
</MultiImport>

PI attributes

PI Attribute

Description

action

Specifies the type of action to be performed. There are two possible values:

single-table-import (the default) –used to import into a single table.

multi-tables-import – used to import into multiple tables.

relationship-behaviour

Possible values are "default" (the default) and "as-reference".

If set to "default", XML.Import will look at the Type Of Relationship to decide what to do with obsolete children in a sitation where a parent and its children are both present in the XML.

If set to "as-reference", it will not look at Type of Relationship. Instead, it will treat all relationships as "reference" relationships. The "as-reference" setting guarantees that obsolete children will not be dropped.

See also: Importing Parent-Child Data with XML Import.

This PI attribute is only of interest if action is set to "multi-tables-import", and both parent table and child table records exist in the XML.

return-corrected-records

Possible values are "yes" (the default), "no", and file-name.

If set to "yes" the current values for inserted and updates rows are sent back to the user.

If set to "no", no output is generated.

If set to a file-name, then the output will be written directly to a file and the file name will be returned to the user.

use-io-formats

Specifies whether the column values to be imported must be checked against the IO format of the corresponding domain or not. It has the same effect as using the UseIOFormats parameter in xml.import.

 

Possible values are "no" (the default) and "yes". The use-io-formats PI attribute has precedence over the UseIoFormats parameter: if both are specified, the PI attribute applies.

verify-original-values

Used 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.

 

Possible values are: "no" (the default), "no-check-on-pk", "all-columns", and "changed-columns". These values coincide with the 4 values of the VerifyOriginalValue parameters of the XML.IMPORT method.

 

The verify-original-values PI attribute has precedence over the VerifyOriginalValues parameter of XML.IMPORT: if both are specified, the PI attribute applies.

version

Reserved for future use. Default value is currently 1.0. If another version is specified an error message will be raised.

 

 

See also

Table sections

Single-table XML documents

Multi-table XML documents