<?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: XML record count in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217947#M13341</link>
    <description>You could use the count() function in xslt and use the tXSLT component.</description>
    <pubDate>Wed, 08 Aug 2012 09:39:13 GMT</pubDate>
    <dc:creator>janhess</dc:creator>
    <dc:date>2012-08-08T09:39:13Z</dc:date>
    <item>
      <title>XML record count</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217943#M13337</link>
      <description>&lt;P&gt;I have an XML file in the following format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;Items&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Detail1&amp;gt;A&amp;lt;/Detail1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Detail3&amp;gt;B&amp;lt;/Detail3&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Detail4&amp;gt;B&amp;lt;/Detail4&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;... &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Detail2&amp;gt;B&amp;lt;/Detail2&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Detail4&amp;gt;B&amp;lt;/Detail4&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;... &lt;/P&gt;&lt;P&gt;&amp;lt;/Items&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to read all the details in as normalised records so I set the Loop XPath to "/Items/Item//*" with columns "fn:name()" and ".". So far so good, I get records as follows: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Detail1,A&lt;/P&gt;&lt;P&gt;Detail3,B&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the problem is there is no unique identifier amongst the various details for each &amp;lt;Item&amp;gt;so how can I create one to link the various detail records, even if it's a simple counter of which &amp;lt;Item&amp;gt;the record is created from? I thought something with fn:position() but I can't make it work. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2012 17:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217943#M13337</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-08-02T17:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: XML record count</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217944#M13338</link>
      <description>Hi&lt;BR /&gt;Maybe create a job like this.&lt;BR /&gt;tFileInputXML --main--&amp;gt;tMap--main--&amp;gt;tLogRow&lt;BR /&gt;In the "outer" of tMap, add a new column and use this column to generate sequence id.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 03 Aug 2012 03:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217944#M13338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-03T03:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: XML record count</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217945#M13339</link>
      <description>That would give me a sequence that increments for each detail but I need a sequence that increments for each Item i.e. one level up from my loop.</description>
      <pubDate>Sun, 05 Aug 2012 08:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217945#M13339</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-08-05T08:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: XML record count</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217946#M13340</link>
      <description>Anyone have any idea, please?</description>
      <pubDate>Wed, 08 Aug 2012 01:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217946#M13340</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-08-08T01:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: XML record count</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217947#M13341</link>
      <description>You could use the count() function in xslt and use the tXSLT component.</description>
      <pubDate>Wed, 08 Aug 2012 09:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-record-count/m-p/2217947#M13341</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2012-08-08T09:39:13Z</dc:date>
    </item>
  </channel>
</rss>

