Grouping a multiple xml tags from different elements into the same element

Four Stars

Grouping a multiple xml tags from different elements into the same element

Hello everyone, 

 

I need some help regarding an xml problem : 

 

I have the following file : 

 

<father>
    <primary>875539032</primary>
    <version>1</version>
    <creationTime>2018-05-17</creationTime>
    <name>NY</name>
    <id>11A12</id>
    <id>12A13</id>
    <id>13A14</id>
    <other>39xA0</other>
</father> <father> <primary>875539032</primary> <version>1</version> <creationTime>2018-05-17</creationTime> <name>NY</name> <id>11A12</id> <id>12A13</id> <id>13A14</id> <other>39xA4</other> </father>
<father> <primary>875539032</primary> <version>1</version> <creationTime>2018-05-17</creationTime> <name>NY</name> <id>11A12</id> <id>12A13</id> <id>13A14</id> <other>39xA7</other>
</father>

I want to group all the <other> in the same <father> because they have the same primary key <primary>

 

I tried to use a tXMLMap but didn't work and lost the tags <id>, it seems i can't loop on 2 elements correctly so maybe my components configuration is not OK, or maybe i don't use the right component..

 

Can someone help me please ?

 

Regards,

 

MBD

Forteen Stars

Re: Grouping a multiple xml tags from different elements into the same element

@Maro11,did you looked into below link?

https://help.talend.com/reader/ixBASPZJ7IvqUQVupZwWbg/EFuE5Nul595D24TRwbFnbw

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads