<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Merging Two xml files in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315667#M86301</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I need to output the following xml (&amp;lt;personnes&amp;gt; are referenced in &amp;lt;roles&amp;gt;)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;&lt;BR /&gt;&amp;lt;data&amp;gt;&lt;BR /&gt;&amp;lt;destinataire oneattribute="blabla"/&amp;gt;
 &amp;lt;personnes&amp;gt;
   &amp;lt;personne ID_personne="Contrat_1_personne1" anotherattribute="X"/&amp;gt;
   &amp;lt;personne ID_personne="Contrat_2_personne1" anotherattribute="Y"/&amp;gt;
   &amp;lt;personne ID_personne="Contrat_2_personne2" anotherattribute="Z"/&amp;gt;
 &amp;lt;/personnes&amp;gt;
 &amp;lt;contrats&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_1_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne2" code_role="S"/&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit C" ref_ID_support_info_generale="ISIN_Produit C"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;&lt;BR /&gt; &amp;lt;/contrats&amp;gt;&lt;BR /&gt;&amp;lt;/data&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;I have no difficulties to generate independantly or combined in the same input all the nodes in rows but I am struggling to generate the output.&lt;/P&gt; 
&lt;P&gt;I tried several solutions using tMaps, tXMLMaps (with lookups) + tFileOutputXML but cannot achieve my aim.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;One of the last I have tried was to generate two different xml for &amp;lt;role&amp;gt; and &amp;lt;support_composant&amp;gt; :&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;
&amp;lt;contrats&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_1_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
  &amp;lt;/contrat&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne2" code_role="S"/&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
  &amp;lt;/contrat&amp;gt;
&amp;lt;/contrats&amp;gt;&lt;/PRE&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;
&amp;lt;contrats&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit C" ref_ID_support_info_generale="ISIN_Produit C"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;
&amp;lt;/contrats&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;And I cannot mix them, I think I'm losing myself in the loops and grouping features...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Anyone has a clue?&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:17:44 GMT</pubDate>
    <dc:creator>aimarsouris</dc:creator>
    <dc:date>2024-11-16T08:17:44Z</dc:date>
    <item>
      <title>Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315667#M86301</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I need to output the following xml (&amp;lt;personnes&amp;gt; are referenced in &amp;lt;roles&amp;gt;)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;&lt;BR /&gt;&amp;lt;data&amp;gt;&lt;BR /&gt;&amp;lt;destinataire oneattribute="blabla"/&amp;gt;
 &amp;lt;personnes&amp;gt;
   &amp;lt;personne ID_personne="Contrat_1_personne1" anotherattribute="X"/&amp;gt;
   &amp;lt;personne ID_personne="Contrat_2_personne1" anotherattribute="Y"/&amp;gt;
   &amp;lt;personne ID_personne="Contrat_2_personne2" anotherattribute="Z"/&amp;gt;
 &amp;lt;/personnes&amp;gt;
 &amp;lt;contrats&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_1_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne2" code_role="S"/&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit C" ref_ID_support_info_generale="ISIN_Produit C"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;&lt;BR /&gt; &amp;lt;/contrats&amp;gt;&lt;BR /&gt;&amp;lt;/data&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;I have no difficulties to generate independantly or combined in the same input all the nodes in rows but I am struggling to generate the output.&lt;/P&gt; 
&lt;P&gt;I tried several solutions using tMaps, tXMLMaps (with lookups) + tFileOutputXML but cannot achieve my aim.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;One of the last I have tried was to generate two different xml for &amp;lt;role&amp;gt; and &amp;lt;support_composant&amp;gt; :&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;
&amp;lt;contrats&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_1_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
  &amp;lt;/contrat&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;roles&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne2" code_role="S"/&amp;gt;
      &amp;lt;role ref_ID_personne="Contrat_2_personne1" code_role="S"/&amp;gt;
    &amp;lt;/roles&amp;gt;
  &amp;lt;/contrat&amp;gt;
&amp;lt;/contrats&amp;gt;&lt;/PRE&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-15"?&amp;gt;
&amp;lt;contrats&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;
  &amp;lt;contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto"&amp;gt;
    &amp;lt;support_composants&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/&amp;gt;
      &amp;lt;support_composant ID_support_composant="Produit C" ref_ID_support_info_generale="ISIN_Produit C"/&amp;gt;
    &amp;lt;/support_composants&amp;gt;
  &amp;lt;/contrat&amp;gt;
&amp;lt;/contrats&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;And I cannot mix them, I think I'm losing myself in the loops and grouping features...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Anyone has a clue?&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315667#M86301</guid>
      <dc:creator>aimarsouris</dc:creator>
      <dc:date>2024-11-16T08:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315668#M86302</link>
      <description>&lt;P&gt;To add up to my issues, I don't have the &lt;SPAN class="ph cmd"&gt;&lt;SPAN class="ph uicontrol"&gt;[...]&lt;/SPAN&gt; button next to the loop elements in my tXMLMap (ESB 6.5.1), maybe I'm missing something because so far my XMLOuputs multiply the inputs as opposed to add them to each other. I get something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;contrats
   contrat 1
      roles
         role contrat_1_personne1
      /roles
      support_composants
         support_composant product_A
      /support_composants
   /contrat
   contrat 1
      roles
         role contrat_1_personne1
      /roles
      support_composants
         support_composant product_B
      /support_composants
   /contrat
   contrat 2
      roles
         role contrat_2_personne1
      /roles
      support_composants
         support_composant product_A
      /support_composants
   /contrat
.......
/contrats&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 May 2018 17:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315668#M86302</guid>
      <dc:creator>aimarsouris</dc:creator>
      <dc:date>2018-05-08T17:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315669#M86303</link>
      <description>&lt;P&gt;Here is one of my last tries...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 581px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LxU5.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136046i7C2735D136084812/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LxU5.jpg" alt="0683p000009LxU5.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LxIW.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137319i3EF10E3DC85C74D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LxIW.jpg" alt="0683p000009LxIW.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 17:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315669#M86303</guid>
      <dc:creator>aimarsouris</dc:creator>
      <dc:date>2018-05-08T17:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315670#M86304</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Here is a 'append the source xml file' feature on tAdvanceFileOutputXML component.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 07:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315670#M86304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T07:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315671#M86305</link>
      <description>&lt;P&gt;Thanks Sabrina, tFileOutputMSXML made it... at last &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 08:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315671#M86305</guid>
      <dc:creator>aimarsouris</dc:creator>
      <dc:date>2018-05-09T08:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315672#M86306</link>
      <description>&lt;P&gt;Hi again xdshi, thanks also for your tip: I suspect it will be the clue to finalize my "global" xml. Best regards&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 08:16:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315672#M86306</guid>
      <dc:creator>aimarsouris</dc:creator>
      <dc:date>2018-05-09T08:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two xml files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315673#M86307</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;For merging two xml files its okay with&amp;nbsp;&lt;SPAN&gt;FileOutputMSXML&amp;nbsp;&lt;/SPAN&gt;, but I have around 10 xml files.I would like to put all together in one xml file.As there are many loops ,which composant I can use to solve my issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 15:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merging-Two-xml-files/m-p/2315673#M86307</guid>
      <dc:creator>Manoj_MUTHURAJA</dc:creator>
      <dc:date>2019-10-28T15:57:22Z</dc:date>
    </item>
  </channel>
</rss>

