<?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: How to parse XML in loop and find Index value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373043#M135809</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;- Thanks for the response.&lt;/P&gt; 
&lt;P&gt;Now I got couple of rows, there I don't see value 7 / 8 after Index_Reason field.&amp;nbsp; How to get this ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;After parsing...&lt;/P&gt; 
&lt;P&gt;bk001|Writer|The First Book|Fiction|44.95|2000-10-01|An amazing story of nothing.|PageList|1|Bundle1|20170525T040000.000 GMT|Reasons1|User1|Name1|20170525T195225.384 GMT|New1|New Bundle1|Bundle1|Property|Index_Reason|PageList|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;bk001|Writer|The First Book|Fiction|44.95|2000-10-01|An amazing story of nothing.|PageList|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason|PageList|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Since some of the fields are common and only few fields repeated twice, my objective to get single record and repeated fields should be additional columns.&amp;nbsp; So I tried to combine with tDenormalize with id, author, title, genre, price, pub_date, review.&amp;nbsp; It didn't helped.&amp;nbsp; Then followed tMap to copy the files into two different output files and used again tMap to join with above key fields, it created duplicate records and removed with tUniqueRow&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now the results shows as per below (Except the Index Value, I need your input&amp;nbsp;the value).&amp;nbsp; Is there any other better way to do this ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;bk001|Writer|The First Book|Fiction|44.95|2000-10-01|An amazing story of nothing.|PageList|1|Bundle1|20170525T040000.000 GMT|Reasons1|User1|Name1|20170525T195225.384 GMT|New1|New Bundle1|Bundle1|Property|Index_Reason|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 04:01:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-12T04:01:42Z</dc:date>
    <item>
      <title>How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373038#M135804</link>
      <description>&lt;P&gt;I am trying to parse the XML, need input how to parse the loop (rowdata repated twice) and how to get RepeatIndex value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;main&amp;gt;&lt;/P&gt;
&lt;P&gt;..&lt;/P&gt;
&lt;P&gt;&amp;lt;ResonLst RepatingType="PageLst"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;rowdata RepatIndex="1"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Desc&amp;gt;Description&amp;lt;/Dec&amp;gt;&lt;/P&gt;
&lt;P&gt;..&lt;/P&gt;
&lt;P&gt;&amp;lt;rowdata RepeatIndex="Index_list"&amp;gt;&amp;lt;4&amp;gt;&amp;lt;/rowdata&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/rowdata&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;rowdata RepatIndex="2"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Desc&amp;gt;Description&amp;lt;/Dec&amp;gt;&lt;/P&gt;
&lt;P&gt;..&lt;/P&gt;
&lt;P&gt;&amp;lt;rowdata RepeatIndex="Index_list"&amp;gt;&amp;lt;5&amp;gt;&amp;lt;/rowdata&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/rowdata&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/ReasonLst&amp;gt;&lt;/P&gt;
&lt;P&gt;..&lt;/P&gt;
&lt;P&gt;&amp;lt;/main&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 03:38:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373038#M135804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T03:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373039#M135805</link>
      <description>Hi 
&lt;BR /&gt;As a newbie, I would suggest you to go Repository-&amp;gt;Metadata and create a XML metadata following the wizards, the Loop xpath query element will be set to rowdata.
&lt;BR /&gt;Let me know if you have any questions.
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 09 Oct 2017 04:43:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373039#M135805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T04:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373040#M135806</link>
      <description>&lt;P&gt;Thanks for the quick response Shong.&amp;nbsp; Actually I followed Metadata -&amp;gt; File XML -&amp;gt; selected all the fields.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) I am able to get the first occurrence of rawdata, NOT second occurrences.&lt;/P&gt;
&lt;P&gt;2) Even the first occurrence I am able to get the Index header within " ", but not the value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking for these option to get additional fields while parsing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 14:38:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373040#M135806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T14:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373041#M135807</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;- I have attached sample XML, I have created metadata for this XML and used this in tFileInputXML.&amp;nbsp; tLogRow shows only below values, rest of the values are not parsing.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;bk001|Writer|The First Book|Fiction|44.95|23-03-0007|An amazing story of nothing.|PageList|1|Bundle1|20170525T040000.000 GMT|Reasons1|User1|Name1|20170525T195225.384 GMT|New1|New Bundle1|Bundle1|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Could you please help on this ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lqs4"&gt;book.xml.xml&lt;/A&gt;</description>
      <pubDate>Wed, 11 Oct 2017 04:08:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373041#M135807</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-11T04:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373042#M135808</link>
      <description>&lt;P&gt;Hi&lt;/P&gt; 
&lt;P&gt;Set the Xpath loop query to&amp;nbsp;/x:books/book/ReasonList/rowdata, you should be able to extract all records, see&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 724px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrCa.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147001i6B72536338E9BC44/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrCa.png" alt="0683p000009LrCa.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 10:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373042#M135808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-11T10:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373043#M135809</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;- Thanks for the response.&lt;/P&gt; 
&lt;P&gt;Now I got couple of rows, there I don't see value 7 / 8 after Index_Reason field.&amp;nbsp; How to get this ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;After parsing...&lt;/P&gt; 
&lt;P&gt;bk001|Writer|The First Book|Fiction|44.95|2000-10-01|An amazing story of nothing.|PageList|1|Bundle1|20170525T040000.000 GMT|Reasons1|User1|Name1|20170525T195225.384 GMT|New1|New Bundle1|Bundle1|Property|Index_Reason|PageList|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;bk001|Writer|The First Book|Fiction|44.95|2000-10-01|An amazing story of nothing.|PageList|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason|PageList|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Since some of the fields are common and only few fields repeated twice, my objective to get single record and repeated fields should be additional columns.&amp;nbsp; So I tried to combine with tDenormalize with id, author, title, genre, price, pub_date, review.&amp;nbsp; It didn't helped.&amp;nbsp; Then followed tMap to copy the files into two different output files and used again tMap to join with above key fields, it created duplicate records and removed with tUniqueRow&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now the results shows as per below (Except the Index Value, I need your input&amp;nbsp;the value).&amp;nbsp; Is there any other better way to do this ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;bk001|Writer|The First Book|Fiction|44.95|2000-10-01|An amazing story of nothing.|PageList|1|Bundle1|20170525T040000.000 GMT|Reasons1|User1|Name1|20170525T195225.384 GMT|New1|New Bundle1|Bundle1|Property|Index_Reason|2|Bundle2|20170525T040000.000 GMT|Reasons2|User2|Name2|20170525T195225.384 GMT|New2|New Bundle2|Bundle2|Property|Index_Reason&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 04:01:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373043#M135809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-12T04:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373044#M135810</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/0053p000007LMPmAAO"&gt;@New_User&lt;/A&gt; wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;- Thanks for the response.&lt;/P&gt; 
 &lt;P&gt;Now I got couple of rows, there I don't see value 7 / 8 after Index_Reason field.&amp;nbsp; How to get this ?&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;&lt;SPAN&gt;See screenshot, you should extract the field&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Indexes/rowdata to get value 7/8.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 720px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrLh.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156838iED2CB517D63C8A4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrLh.png" alt="0683p000009LrLh.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 08:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373044#M135810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-13T08:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse XML in loop and find Index value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373045#M135811</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;- Thanks for the prompt response.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The parsing which I am trying to do is manually specifying XPath for each loop.&amp;nbsp; Is there option do automatically parse with XSD ?&amp;nbsp; So that I don't need to worry about if any other loop with different file ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Tried tFileInputRaw (read XML file) -&amp;gt; tHMap (input is XML and output is Flat) -&amp;gt; tFileOutputDelimited.&amp;nbsp; In this flow I am not able to get header and there is NO option to specify the delimiter to get it as CSV file.&amp;nbsp; Is there any option to get the schema for the XSD and specify the delimiter for this scenario ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Looking for option if XML input given then loop through fields as additional rows and comma delimited as output with header.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please share your thoughts.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-parse-XML-in-loop-and-find-Index-value/m-p/2373045#M135811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-13T17:52:17Z</dc:date>
    </item>
  </channel>
</rss>

