<?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: File xml -- Get Loop Index for the xpath in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338935#M107129</link>
    <description>&lt;P&gt;This helps&amp;nbsp;count(preceding-sibling::*)+1 in getting the loop index of an XML&lt;/P&gt;</description>
    <pubDate>Thu, 01 Mar 2018 18:03:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-01T18:03:22Z</dc:date>
    <item>
      <title>File xml -- Get Loop Index for the xpath</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338932#M107126</link>
      <description>&lt;P&gt;We are using filexml to parse a xml file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a requirement to find the loop index, is there any xpath expression to populate the counter&lt;/P&gt;
&lt;P&gt;Our file looks like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;REPORT&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;HEADER&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;KEY&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ITEM&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;F1&amp;gt;value1&amp;lt;F1/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;F2&amp;gt;value2&amp;lt;F2/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ITEM/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ITEM&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;F1&amp;gt;value3&amp;lt;F1/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;F2&amp;gt;value4&amp;lt;F2/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ITEM/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;lt;HEADER/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;lt;REPORT/&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the above example, my output should be&lt;/P&gt;
&lt;P&gt;ITEM value1 value2 1(loop index counter)&lt;/P&gt;
&lt;P&gt;ITEM value3 value4 2(loop index counter)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to know the loop index for the &amp;lt;ITEM/&amp;gt; when we are parsing in FileXML? Are there any valid xpath expression i can use to determine the counter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Srini&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 22:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338932#M107126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-02T22:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: File xml -- Get Loop Index for the xpath</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338933#M107127</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Do you want to output a xml file including multiple loop elements?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could you please elaborate your case with an example with input and expected output values?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sabrina&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 03:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338933#M107127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-05T03:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: File xml -- Get Loop Index for the xpath</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338934#M107128</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are parsing the xml files by using &lt;STRONG&gt;file xml&lt;/STRONG&gt; option&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Input is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;diagnosis&amp;gt;&lt;BR /&gt;&amp;lt;code="I10"&amp;gt;CODE1&amp;lt;/code&amp;gt;&lt;BR /&gt;&amp;lt;displayName&amp;gt;CODE1 DESCRIPTION&amp;lt;/displayName&amp;gt;&lt;BR /&gt;&amp;lt;/diagnosis&amp;gt;&lt;BR /&gt;&amp;lt;diagnosis&amp;gt;&lt;BR /&gt;&amp;lt;code type="I10"&amp;gt;CODE2&amp;lt;/code&amp;gt;&lt;BR /&gt;&amp;lt;displayName&amp;gt;CODE2 DESCRIPTION&amp;lt;/displayName&amp;gt;&lt;BR /&gt;&amp;lt;/diagnosis&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output&amp;nbsp;should be&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CODE1&lt;BR /&gt;CODE1 DESCRIPTION&lt;BR /&gt;1&lt;/P&gt;&lt;P&gt;CODE2&lt;BR /&gt;CODE2 DESCRIPTION&lt;BR /&gt;2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For every loop of&amp;nbsp;&lt;SPAN&gt;&amp;lt;diagnosis&amp;gt; we need get the counter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What functions we can use in&amp;nbsp;&lt;STRONG&gt;file xml&lt;/STRONG&gt; to get the counter for the nodes?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Srini&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 20:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338934#M107128</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-21T20:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: File xml -- Get Loop Index for the xpath</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338935#M107129</link>
      <description>&lt;P&gt;This helps&amp;nbsp;count(preceding-sibling::*)+1 in getting the loop index of an XML&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 18:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-xml-Get-Loop-Index-for-the-xpath/m-p/2338935#M107129</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-01T18:03:22Z</dc:date>
    </item>
  </channel>
</rss>

