Skip to main content Skip to complementary content

Defining the output mode

To define the output mode of the document-type data, you are defining whether to put all of the XML elements into one single XML flow and when empty element exist, whether to output them. By doing this, you do not change the structure of the XML tree you have created.

Outputing elements into one document

About this task

Unless you are using the aggregate element which always classifies the output elements and splits an output XML flow, you are able to determine whether an XML flow is output as one single flow or as separate flows, using the All in one feature in the tXMLMap editor.

To do this, on the output side of the Map editor, proceed as follows:

Procedure

  1. Click tMap settings to open the map setting panel. The following figure presents an example.
  2. Click the All in one field and from the drop-down list, select true or false to decide whether the output XML flow should be one single flow.
    All in one field.
    • If you select true, the XML data is output all in one single flow. In this example, the single flow reads as follows:

      Example of an output in one single flow when true has been selected.

      The structure of this flow reads:

      Example of an output in one single flow in a structured file.
    • If you select false, the XML data is output in separate flows, each loop being one flow, neither grouped nor aggregated. In this example, these flows read as follows:

      Example of an output in one separate flow when false has been selected.

      Each flow contains one complete XML structure. To take the first flow as example, its structure reads:

      Example of an output in one single flow in a structured file.
    Information noteNote: The All in one feature is disabled if you are using the aggregate element.

Managing empty element in Map editor

About this task

It may be necessary to create and output empty elements during the process of transforming data into XML flow, such as, when tXMLMap works along with tWriteXMLField that creates empty elements or when there is no input column associated with certain XML node in the output XML data flow.

By contrast, in some scenarios, you do not need to output the empty element while you have to keep them in the output XML tree for some reasons.

tXMLMap allows you to set the boolean for the creation of empty element. To do this, on the output side of the Map editor, perform the following operations:

Procedure

  1. Click tMap settings to open the map setting panel.
  2. In the panel, click the Create empty element field and from the drop-down list, select true or false to decide whether to output the empty element.
    Create empty element field.
    • If you select true, the empty element is created in the output XML flow and output, for example, <customer><LabelState/></customer>.

    • If you select false, the empty element is not output.

Defining the sequence of multiple input loops

About this task

If a loop element, or the flat data flow, receives mappings from more than one loop element of the input flow, you need to define the sequence of the input loops. The first loop element of this sequence will be the primary loop, so the transformation process related to this sequence will first loop over this element such that the data outputted will be sorted with regard to its element values.

Overview of the Sequence window.

For example, in this figure, the types element is the primary loop and the outputted data will be sorted by the values of this element.

Example of an XML file for the 'types' element.

In this case in which one output loop element receives several input loop elements, a [...] button appears next to this receiving loop element or for the flat data, appears on the head of the table representing the flat data flow. To define the loop sequence, do the following:

Procedure

  1. Click this [...] button to open the sequence arrangement window as presented by the figure used earlier in this section.
  2. Use the up or down flash button to arrange this sequence.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!