<?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 Re: Advanced XML with different loops in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372369#M135218</link>
    <description>See 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCppSCAS" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-tFileOutputMSXML/td-p/104703&lt;/A&gt; for an answer. To merge the output in your tree style you need to have the non loop part the same in the multiple roots so that they can be matched. I think there is a better example from Shong but I couldn't find it.</description>
    <pubDate>Mon, 07 Dec 2009 17:05:45 GMT</pubDate>
    <dc:creator>janhess</dc:creator>
    <dc:date>2009-12-07T17:05:45Z</dc:date>
    <item>
      <title>Advanced XML with different loops</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372368#M135217</link>
      <description>Hello, 
&lt;BR /&gt;I have a scenario using XML files in which I have to set up something like this :
&lt;BR /&gt;I have 3 data sources. Invoice_Header, Invoice_Line and Invoice_Line_Tax
&lt;BR /&gt;My Invoice_Header schema is something like 
&lt;BR /&gt;ID,
&lt;BR /&gt;TotalAmt,
&lt;BR /&gt;Description
&lt;BR /&gt;My Invoice_Line schema is something like 
&lt;BR /&gt;LineID,
&lt;BR /&gt;HeaderID,
&lt;BR /&gt;LineAmt
&lt;BR /&gt;My Invoice_Line_Tax schema is something like 
&lt;BR /&gt;TaxID,
&lt;BR /&gt;LineID,
&lt;BR /&gt;TaxPerct,
&lt;BR /&gt;TaxAmt
&lt;BR /&gt;I would like to read the 3 separate tables and come up with one single XML at the end. 
&lt;BR /&gt;My problem is that I can't figure out a way to join the values because of different loops...for 1 invoice, I might have N lines, and for 1 Line I might have N Taxes
&lt;BR /&gt;I've attached some handmade xml's that I'm working with to try to figure this out, there are the separated XML's and the final structure I would like to get to. It's something like this :
&lt;BR /&gt;&amp;lt;Invoices&amp;gt;
&lt;BR /&gt; &amp;lt;Invoice&amp;gt;
&lt;BR /&gt; &amp;lt;ID/&amp;gt;
&lt;BR /&gt; &amp;lt;TotalAmt/&amp;gt;
&lt;BR /&gt; &amp;lt;Description/&amp;gt;
&lt;BR /&gt; &amp;lt;InvoiceLines&amp;gt; /* Loop 1-N */
&lt;BR /&gt; &amp;lt;Line&amp;gt;
&lt;BR /&gt; &amp;lt;LineID/&amp;gt;
&lt;BR /&gt; &amp;lt;LineAmt/&amp;gt;
&lt;BR /&gt; &amp;lt;LineTaxes&amp;gt; /* Second Loop 1-N */
&lt;BR /&gt; &amp;lt;Tax&amp;gt;
&lt;BR /&gt; &amp;lt;TaxID/&amp;gt;
&lt;BR /&gt; &amp;lt;TaxPerct/&amp;gt;
&lt;BR /&gt; &amp;lt;TaxAmt/&amp;gt;
&lt;BR /&gt; &amp;lt;Tax/&amp;gt;
&lt;BR /&gt; &amp;lt;/LineTaxes&amp;gt; 
&lt;BR /&gt; &amp;lt;/Line&amp;gt;
&lt;BR /&gt; &amp;lt;/InvoiceLines&amp;gt;
&lt;BR /&gt; &amp;lt;/Invoice&amp;gt;
&lt;BR /&gt;&amp;lt;/Invoices&amp;gt;
&lt;BR /&gt;Does anybody have any kind of ideas or something for me to try out ? I'm currently going for the tJava component and appending the strings for 3 different files into one...but that's obviously something I would like to avoid. 
&lt;BR /&gt;Thanks!</description>
      <pubDate>Sat, 16 Nov 2024 13:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372368#M135217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced XML with different loops</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372369#M135218</link>
      <description>See 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCppSCAS" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-tFileOutputMSXML/td-p/104703&lt;/A&gt; for an answer. To merge the output in your tree style you need to have the non loop part the same in the multiple roots so that they can be matched. I think there is a better example from Shong but I couldn't find it.</description>
      <pubDate>Mon, 07 Dec 2009 17:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372369#M135218</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2009-12-07T17:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced XML with different loops</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372370#M135219</link>
      <description>Also have a look at these articles:&lt;BR /&gt;This one should answer to your needs:&lt;BR /&gt;&lt;A href="http://makina-corpus.com/blog/metier/2014/talend-tutorial-advanced-xml-transformation-2013-part-2-table-rows-to-xml" target="_blank" rel="nofollow noopener noreferrer"&gt;Talend Tutorial - Advanced XML transformation ? Part 2 - table rows to XML&lt;/A&gt; &lt;A href="http://makina-corpus.com/blog/metier/2014/talend-tutorial-advanced-xml-transformation-2013-part-2-table-rows-to-xml" rel="nofollow noopener noreferrer"&gt;http://makina-corpus.com/blog/metier/2014/talend-tutorial-advanced-xml-transformation-2013-part-2-table-rows-to-xml&lt;/A&gt;&lt;BR /&gt;And this other will do the opposed job: &lt;A href="http://makina-corpus.com/blog/metier/2014/advanced-xml-transformation-2013-part-1-xml-to-table-rows" target="_blank" rel="nofollow noopener noreferrer"&gt;Talend Tutorial - Advanced XML transformation ? Part 1 - XML to table rows&lt;/A&gt; &lt;A href="http://makina-corpus.com/blog/metier/2014/advanced-xml-transformation-2013-part-1-xml-to-table-rows" rel="nofollow noopener noreferrer"&gt;http://makina-corpus.com/blog/metier/2014/advanced-xml-transformation-2013-part-1-xml-to-table-rows&lt;/A&gt;</description>
      <pubDate>Mon, 03 Mar 2014 16:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-XML-with-different-loops/m-p/2372370#M135219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-03T16:17:37Z</dc:date>
    </item>
  </channel>
</rss>

