A number of parameters for XML.Import can be specified in a processing instruction in the XML document, as the following example demonstrates:
<?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 = "CONSTANTINC"/>
</Employees>
<Departments documentName ="Departments">
<DEPARTMENT ID="1" NAME= "CON"/>
</Departments >
</MultiImport>
The available processing instructions are described in the table below.
Processing Instruction
|
Description
|
version
|
Reserved for future use. Default value is currently 1.0. If another version is specified an error message will be raised.
|
action
|
Specifies the type of action to be performed. There are two possible values:
multi-tables-import – used to import into multiple tables
single-table-import –used to import into a single table
By default the value is single-table-import.
|
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 "yes" or "no". The use-io-formats processing instruction has precedence over UseIoFormats parameter (if both are specified the processing-instruction value is used). The default value is "no".
|
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. The possible values are: "no", "changed-columns", "all-columns", and "no-check-on-pk".
The verify-original-values processing instruction has precedence over the VerifyOriginalValues xml-import parameter (meaning that, if both are specified, the processing-instruction value is used). The default value is "no".
|
return-corrected-records
|
Possible values are "no", "yes", or <file name>. If set to "yes" the current values for inserted/updates rows are sent back to the user. If set to "no", no output is generated. If a file name is specified then the output will be written directly to a file and the file name will be returned to the user. The default value is "yes".
|
|