Managing empty element in Map editor - 7.3

Talend Data Fabric Studio User Guide

English (United States)
Data Fabric
Talend Data Fabric
Talend Studio
Design and Development

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:


  1. Click the pincer icon 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.
    • 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.