XML Load

image_pdfimage_print

This load is used to write a tabular-based data source to an XML file.

Main settings

Mode

In all modes except “create”, an XML element of the generated (source) document is matched to an already existing (target) document. If the XML file does not yet exist, it is created in all modes.

 

add:

Finds all elements matching XPath root expression (root) in source document and in target element. Adds all children of all source elements as new children for all target elements.

 

create:

Creates a new XML file, and deletes an existing XML file.

 

delete:

Finds all elements matching root in source document and in target element. Removes children of all target elements if they match a child of any source element.

 

insert:

Finds all elements matching root in source document and in target element. Adds children of all source elements as new children for all target elements if they do not having at least one matching child yet.

 

update:

Finds all elements matching root in source document and in target element. Removes all children of all target elements. Adds all children of all source elements as new children for all target elements.

XPath root expression

This is an absolute XPath expression that specifies the root nodes under which the source data is written in the XML file. Only simple XPath expressions with element names concatenated with “/” are supported. 

Example: /project/connections

The output is defined with a list of column definitions that contain the following elements: 

XPath expression

Defines the XML element relative to the XPath root expression.

Input

Reference to a source column or a constant value.

In the context of this load, XML elements are matched by the following criteria:

  • Elements have the same name (regardless of namespace).
  • All attributes defined in the source document element are present in the target document element and have the same attribute values.
  • Default namespace: if set, this default namespace is applied in the XML file
  • If the option “always generate” is set, then for all input rows a new root element is generated.
 Notes
  • If no columns are defined, the XML load will create a simple XML output in a fixed tabular format using the tags <data>, <row> and <value>. In this case only the “create” and “add” modes are supported, and no XPath root expression can be defined.
  • If the XMLFile connection contains a XSD schema file, it will be used to generate the XML document.
image_pdfimage_print
Was this post helpful?
NoYes (No Ratings Yet)
Loading...