XML Mapping with multiple loop elements

One Star

XML Mapping with multiple loop elements

Hi,

 

I'm using the Talend Open Studio for Data Integration (v.7.1.1.20181026_1147) and I'm trying to merge two xml files into another xml file. In attach i send to you both those files, with the name "tabela1.xml" and "tabela2.xml" respectively. The desired output is also in attach with the name "result.xml" as the project itself (MERGEXML.zip).

 

At this stage i'm not able to get the output I want, because I can't figure out how to add two loop elements (see image capture.png in attach).

 

Can you please advice me how to accomplish this?

 

Thanks in advance,

Best regards,

Pedro

 

Nine Stars

Re: XML Mapping with multiple loop elements

In the results you want this:

 

...
<person> <id>2</id> <name>Francisca</name> <age>34</age> <cars> <brand>Fiat</brand> <brand>VW</brand>
</cars> </person>
...

not this

...
<person> <id>2</id> <name>Francisca</name> <age>34</age> <brand>Fiat</brand> <brand>VW</brand> </person>
...

Right?

--
Please give Kudos and mark topics as solved where appropriate.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog