Nuclos XML structure definition: XPath, structure match, attribute match, xpath2value, well-formed, mixed content, XML import.

globe with meridians Language: Deutsch · English

open book XML structure definition

Map XML to business objects – structure/attribute match, xpath2value and the limits of the XML import.

On this page

XML import in Nuclos

The XML import closely follows the CSV structure definition; here we only cover the differences. There are XML structure definitions (mapping per BO) and the XML file import (ordering).

XML structure definition

FieldMeaning
Match (structure)simple XPath that triggers attribute processing.
Business objectthe BO that is created/updated/deleted.
Match (attribute)XPath relative to the structure match, selects the node to transfer.
Attribute (BO)target field for the extracted value.
Calculation expressionGroovy script with xpath2value (map), line, log – e.g. to compose a value from several nodes.
Formatas in the CSV import; only effective without a script.

XML file import flow

  1. The XML file is read completely once per structure definition.
  2. At the structure match the enclosed subtree is built into a Map (relative XPath → value).
  3. Attribute values are obtained from the map using the attribute match as key.
  4. Optionally a calculation expression provides the map as xpath2value.
  5. Exactly one attribute match may „reach outside“ (attributes/direct children of the structure match's parents).

Limitations: the file must be well-formed (no schema needed/possible); mixed content is not supported (an element contains either text or child elements); a BO's data must reside in one contiguous subtree and is loaded fully into memory – so keep it small. The XML import is unsuitable for deeply nested structures.

Related pages

clipboard Structure definition


CSV variant.

Open →

electric plug Object import


Run the import.

Open →