usoft-xml processing instruction


Userlevel 3
Badge +2

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

Syntax

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

The action attribute is required. Further attributes are optional. If an attribute is not supplied, handling is as if it were supplied with its default value. 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>

Attributes

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.
append-to-file

When return-corrected-records has been set to file-name, this procession instruction can be used to specify if the file needs to be overwritten or appended.

Possible values are "no" (the default) and "yes".

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 situation 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: Generating key values for parent-child data on import.
This 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 attribute has precedence over the UseIoFormats parameter: if both are specified, the processing-instruction 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 processing-instruction attribute has precedence over the VerifyOriginalValues parameter of XML.Import: if both are specified, the processing-instruction attribute applies.

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

 


0 replies

Be the first to reply!

Reply