The Append the source XML file feature - 7.1

XML connectors

Version
7.1
Language
English (United States)
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > XML components > XML connectors
Data Quality and Preparation > Third-party systems > XML components > XML connectors
Design and Development > Third-party systems > XML components > XML connectors
This scenario shows the way to append records to an existing XML file.

The Append the source xml file feature provided by the tAdvancedFileOutputXML component appends records to an existing XML file. This feature also resolves the can't create multiple loop elements on tAdvancedFileOutputXML at a time limitation: you can output one entity to an XML file first and append another entity to the existing XML file with this feature.

This scenario generates an XML file using the data in the following two tables.

Person

Class_id Person_id Name
1 1 Shong
1 2 Elisa
2 1 Sabrina
2 2 Patrick

Item

Class_id Person_id Name
1 1 item1
1 2 item2
2 1 item3

The scenario reads the above data and generates the following XML file.

Tip: From the above XML file, you can see that there are two loop elements in the file: person and item. However, the tAdvancedFileOutputXML component does not support setting multiple loop elements at a time. You can use the Append the source xml file feature of the tAdvancedFileOutputXML to avoid this restriction and solve the problem.