XML format description

The description of the XML nodes can be useful if you have knowledge of XML and wish to make the adjustments that can be made in the user interface by means of an editor instead.

Also see General structure of the XML document

 

es2000 does not make any recommendation regarding the suitability of the following information. Errors and exceptions are excluded and no responsibility is accepted for the information provided. The statements are simply descriptions and do not guarantee the consistency of the products. The information may also in part be regarded as an attempt to provide you with assistance for a task even if the product was not actually intended for this special purpose.

 

Direct editing of the XML file requires care and expertise and should therefore only be done when absolutely necessary.

The following syntax is used for the Descriptions attribute:

Name: (type [default value])

transfer

transfer

Transfer is the root element and is required exactly once.

Attributes

version: (string [1.0])

Indicates the version of the description file.

 

This attribute is required from Version 1.1 onwards.

checkactive: (bool [false])

If true, a query is displayed before a manual transfer that asks which fields are to be transferred. (See active attribute for table and field).

transaction: (bool [false])

If true, every table within a transaction is transferred.

assembly

Specifies a file mane for an assembly that is required for execution of the transfer.

All types in the assembly deriving from ES2000.Updatelib.TransferDescriptor are instanced once and the RegisterTransferMethods method of this instance is called.

Attributes

filename: (string [])

Specifies the file name of the assembly.

 

This attribute / value is required.

parameter

parameter

Specifies the value of a parameter, for example for assembly, execsql or call nodes.

Attributes

id: (string [])

Specifies the parameter ID.

 

This attribute / value is required.

value: (string[])

Specifies the parameter value.

 

This attribute / value is required.

execsql

execsql

Executes a simple SQL command on either the source or the target database.

Attributes

order: (int [-1])

Can occur once or not at all and describes the order in which the SQL command is executed.

Larger numbers are transferred later.

stoponerror: (bool [true])

Specifies if the transfer is to be canceled if an error occurs.

db: ( {SOURCE | TARGET } [])

Specifies if the command is to be executed on the source or the target database.

 

This attribute / value is required.

command: (string [])

The SQL command to be executed. Parameters that are replaced before execution can be defined. These parameters are stated as follows: Delete from {table}, where table would be the parameter name.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

parameter

parameter

Specifies the value of a parameter, for example for assembly, execsql or call nodes.

Attributes

id: (string [])

Specifies the parameter ID.

 

This attribute / value is required.

value: (string[])

Specifies the parameter value.

 

This attribute / value is required.

logfile

logfile

Specifies a file to be saved in the transfer protocol.

Attributes

filename: (string [])

Contains the path to the file that the log is saved in.

 

<logfile filename="C:\temp\logdb.log" />

id: (string[])

Can contain a value that can be used to uniquely identify the node.

table

table

Describes a source table

Attributes

order: (int [-1])

Can occur once or not at all and describes the order in which the table is transferred. Larger numbers are transferred later.

checkupdate: (bool [false])

Can occur once or not at all and determines whether the data set should be checked to see if it is already in the target table. If the data set is found, an update will take place. If not, an Insert will be made.

stoponerror: (bool [true])

Specifies if the transfer is to be canceled if an error occurs.

filter: (string [])

The source data can be filtered using the Filter attribute. The syntax within the filter is SQLClosed Structured Query Language SQL is a database language used to define, query, and manipulate data in relational databases. SQ L is standardized by ANSI and ISO ans supported by practically all current database systems..

 

Use of ANSI SQL is recommended so that as many database types as possible are supported.

name: (string [])

Specifies the name of the source table.

 

This attribute / value is required.

autocopy: (bool [false])

If AutoCopy is set, the table is transferred 1:1.

Manual assignment of fields is not required.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

active: (bool [false])

Indicates if this object is to be transferred or not.
If active is not defined, then if transfer: checkactive is set to true, a corresponding query is generated for a manual transfer.

field

field

Describes a field in the source table that is toi be transferred to a target table.

Attributes

name: (string [])

Contains the name of the source field.

 

This attribute / value is required.

action: (char [])

Contains the transfer type. This attribute can have the value C or T.

C stands for a copy operation and T for a program controlled transfer.

typ: (string [])

Contains the type definition of the source field.

Field types

The various field types that can occur in the XML file are listed below:

Abbreviation - Meaning

I - Integer (32 bit)

S - Small - Integer (16 bit)

F - Float / Double

D - DateTime / TimeStamp

M - Memo (PlainText)

R - Memo (RichText)

H - Memo (HTML)

B - Blob

A|1 - Boolean (string of length 1)

A|X - String of length X

id: (string[])

Can contain a value that can be used to uniquely identify the node.

active: (bool [false])

Indicates if this object is to be transferred or not.
If active is not defined, then if transfer: checkactive is set to true, a corresponding query is generated for a manual transfer.

const

const

Describes a constant value for the target data.

Attributes

value: (any [])

Contains the value to be inserted into the target table. The value is cast according to the type definition of the target field.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

autoinc

autoinc

Describes a value that is incremented by a certain increment after each insertion.

Attributes

startvalue: (double [1])

Specifies the first value to be used.

 

This attribute / value is required.

incby: (double [1])

Specifies the value of the increment.

 

This attribute / value is required.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

dynamic

dynamic

Describes a dynamic value, for example the current date or time.

Attributes

value: (string [])

Specifies the value.

 

This attribute / value is required.

Valid values are:

DATE – corresponds to the current date without the time.

NOW – corresponds to the current date and time.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

expression

expression

Complex calculations can be performed using the Expression function. The ES Expression Language (ESEL) script language is used.

Attributes

value: (string [])

Specifies the value for the calculation formula.

 

This attribute / value is required.

target | setvar | setfont ( - target | setvar )

fromvar

Reads a value from a variable that was set by setvar and transfers the value to the target.

Attributes

name: (string [])

Contains the name of the variable from which the value is read.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

from: (int [0])

Can contain a 0-based index from which the value of the variable is taken. For negative values, the position is calculated from the end of the value so that -1 corresponds to the last character.

to: (int [-1])

Can contain a 0-based index up to which the value of the variable is taken. For negative values, the position is calculated from the end of the value so that -1 corresponds to the last character.

lookup

lookup

Fetches a value from a detail table and inserts it. Lookups can be nested as required.

 

A targettarget must be defined for the last lookup.

Attributes

name: (string [])

The field name of the original table.

 

This attribute / value is required.

table: (string [])

The name of the lookup table.

 

This attribute / value is required.

lookupfield: (string [])

The field in the lookup table that contains the value of name.

 

This attribute / value is required.

valuefield: (string [])

The field in the lookup table the value of which is to be transferred.

 

This attribute / value is required.

db: ( {SOURCE | TARGET } [])

Specifies whether the lookup table is in the source or the target database.

 

This attribute / value is required.

lookuptyp: (string [])

Optionally specifies the type of the lookup field if this has to be cast first.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

switch

switch

Prepares a conditional transfer.

 

Fields that are within a Switch will always be copied.

Attributes

name: (string [])

Specifies a field name within the target table which contains the value from which to branch.

 

This attribute / value is required.

trim: (bool [true])

Specifies if the leading and trailing spaces are to be deleted from the value before the comparison is made.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

fromvar: (bool [false])

Specifies if the value is to be loaded from a variable instead of a field.

case

case

A branch for switch elements

Attributes

value: (string [])

Contains the value that the switch field must contain for the subordinate transfer field to be transferred.

regex: (bool [false])

Specifies if the value in value is a regular expression or a normal string.

 

A check for regex case branches is only made if none of the non regex branches is successful.

 

Regular expressions (RegEx)

You can find information about regular expressions under https://www.regular-expressions.info

default

default

Default field for switch and lookup elements.

 

The internal transfer is executed if no case element applies.

log

log

Writes a log entry or generates an error that cancels the transfer with a specific text.

Attributes

text: (string [])

Contains the text to be written. This text can also include field values from the source data. These are inserted ito the text using {FIELD NAME}

iserror: (bool [false])

Specifies if this is an error or a normal log entry.

id: (string[])

Can contain a value that can be used to uniquely identify the node.

try

try

Contains a command that can possibly generate an error. The catch block can be used to record a command that is executed if an error does occur.

An error could for example be the conversion of a string into a date that is incorrect (55.12.1999 -> date causes an error).

catch

catch

Contains a command that is executed if there is an error for a try block.

group

group

Can contain several sub elements.

This can be useful, for example to set several values in a switch case case.

setfont

setfont

Sets the font.

Attributes

name: (string [])

The name of the font.

size: (float [])

The font size.

color: (color [Black])

The font color.

style: (fontstyle [])

The font style (bold, italic, etc.).

id: (string[])

Can contain a value that can be used to uniquely identify the node.

target

target

Specifies the target of a field or constant.

 

This node can only occur once per node.

If several targets are to be defined the superior nodes must be stated again.

Attributes

table: (string [])

Contains the name of the target table.

 

This attribute / value is required.

field: (string [])

Specifies the field name within the target table

 

This attribute / value is required.

typ: (string [])

Specifies the target field type. The string should be set according to the type definitions described above.

 

This attribute / value is required.

setvar

setvar

Writes the transferred value in a variable. This value can be read out again with fromvar.

Attributes

name: (string [])

Contains the name of the variable in which the value is stored.

action: ((set, concat) [set])

Determines whether the value in the variable is to be overwritten or the new value appended after the existing value.

call

call

Calls up a method from a DLL specified by assembly.

Attributes

name: (string [])

Contains the name of the function to be called.

parameter

parameter

Specifies the value of a parameter, for example for assembly, execsql or call nodes.

Attributes

id: (string [])

Specifies the parameter ID.

 

This attribute / value is required.

value: (string[])

Specifies the parameter value.

 

This attribute / value is required.

Field types

The various field types that can occur in the XML file are listed below:

Abbreviation - Meaning

I - Integer (32 bit)

S - Small - Integer (16 bit)

F - Float / Double

D - DateTime / TimeStamp

M - Memo (PlainText)

R - Memo (RichText)

H - Memo (HTML)

B - Blob

A|1 - Boolean (string of length 1)

A|X - String of length X

General structure of the XML document

Version 1.2

The XML format for alignment between databases looks like this:

Copy
General structure of the XML document
-transfer
    o logfile
    o assembly
        - parameter
    o execsql
        - parameter
    o table
        - field
            - target | setvar | setfont ( - target | setvar )
        - const
            - target | setvar | setfont ( - target | setvar )
        - autoinc
            - target | setvar | setfont ( - target | setvar )
        - dynamic
            - target | setvar | setfont ( - target | setvar )
        - expression
            - target | setvar | setfont ( - target | setvar )
        - fromvar
            - target | setfont ( - target | setvar )
        - group
            - { field | const | autoinc | dynamic | lookup | switch | log | try | fromvar | call | skip | expression }
            - [{ field | const | autoinc | dynamic | lookup | switch | log | try | fromvar | call | skip | expression } …]
        - lookup
            - { lookup | switch | target | setvar | log | try | group | field | skip | expression } 
            - [default]
                - { field | const | autoinc | dynamic | lookup | switch | log | try | fromvar | group | call | skip | expression }
        - switch
            - case
                - { field | const | autoinc | dynamic | lookup | switch | log | try | call | skip | expression }
            - [case …]
                - { field | const | autoinc | dynamic | lookup | switch | log | try | call | skip | expression }
            - [default]
                - { field | const | autoinc | dynamic | lookup | switch | log| try | fromvar | group | call | skip | expression }
        - log
        - try
            - { field | const | autoinc | dynamic | lookup | switch | log | fromvar | group | call | skip | expression }
            - catch
                - { field | const | autoinc | dynamic | lookup | switch | log | try | fromvar | group | call | skip | expression }
        - call
            - parameter
        - skip