Control Elements in the Target Structure for the XML Creation

There are several attributes in target structure nodes and fields, and reserved target structure field names that can be used to control the creation of the XML file.

Attributes of target structure nodes


  • "XML Namespace": This attribute allows to assign an XML namespace to the element created from the node, e.g. soapenv. Additionally, the attribute allows defining this namespace, e.g. soapenv=http://schemas.xmlsoap.org/soap/envelope/. If no namespace is used, the value DEFAULT has to bet set. To define a default namespace (e.g. <element xmlns="http://tempuri.org/">) the value must be set as follows: DEFAULT=http://tempuri.org/

  • "XML/JSON handling": This attribute controls how a node is included in the XML document. The following settings are possible:

    • Normal: The node will be fully output.

    • Exclude: The node will be ignored.

    • Transparent: The node itself will not create an element, but its content will.

    • Array: (This value is not relevant for this function.)

    • Array Transparent: (This value is not relevant for this function.)

  • "Maximum": If a mapping creates several records, a node is generated multiple times over these records. If the node has the value 1 for the node attribute Maximum, the XML element corresponding to the node is only generated once. The fields of the multiple existing nodes are all listed below each other in the XML element. If this behaviour is not desired, simply use value 99999 instead of 1. Here is a hinted example:

images/download/attachments/201685806/XML_IU_Maximum-version-1-modificationdate-1749802314990-api-v2.png

Attributes of target structure fields

  • "XML Namespace": This attribute allows to assign an XML namespace to the element created from the field, e.g. soapenv. Additionally, the attribute allows defining this namespace, e.g. soapenv=http://schemas.xmlsoap.org/soap/envelope/. If no namespace is used, the value DEFAULT has to bet set.

Example for the target node setting "XML/JSON handling"


Suppose you have the following target structure.


images/download/attachments/201685806/141-version-1-modificationdate-1749802314989-api-v2.png


The node root#1 is set in attribute Root node name. We will see the effects of several different settings for the XML handling attribute of the node user#3. The following XML files are the corresponding outputs to the given XML handling setting.

Normal


The node user#3 and all of its fields are output.


xml_no_template_normal.xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
<record art="root" type="map">
<scm:user xmlns:scm="http://scm.de" scm:type="object">
<scm:name scm:type="String">name</scm:name>
<scm:givenName scm:type="String">given</scm:givenName>
</scm:user>
<items type="array">
<arrayItem type="object">
<item type="String">abc</item>
<itemType type="String">ALL</itemType>
</arrayItem>
<arrayItem type="object">
<item type="String">cde</item>
<itemType type="String">ALL</itemType>
</arrayItem>
</items>
<persons test="fix">
<name>20131018</name>
<ignore test="fix"/>
</persons>
</record>
</root>

Transparent

The node user#3 will not be output, but its fields.


xml_no_template_transparent.xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
<record art="root" type="object">
<name type="String">name</name>
<givenName type="String">given</givenName>
<items type="array">
<arrayItem type="object">
<item type="String">abc</item>
<itemType type="String">ALL</itemType>
</arrayItem>
<arrayItem type="object">
<item type="String">cde</item>
<itemType type="String">ALL</itemType>
</arrayItem>
</items>
<persons test="fix">
<name>20131018</name>
<ignore test="fix"/>
</persons>
</record>
</root>

Exclude

The node user#3 and all of its fields are not output.


xml_no_template_exclude.xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
<record art="root" type="map">
<items type="array">
<arrayItem type="object">
<item type="String">abc</item>
<itemType type="String">ALL</itemType>
</arrayItem>
<arrayItem type="object">
<item type="String">cde</item>
<itemType type="String">ALL</itemType>
</arrayItem>
</items>
<persons test="fix">
<name>20131018</name>
<ignore test="fix"/>
</persons>
</record>
</root>