<?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 loop through nested elements in tInputFileXML in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341506#M109453</link>
    <description>Hi: Shong, here is the trim down example. BTW In this example we have more than one occurrences of 2 elements named &amp;lt;oversight_info&amp;gt; and &amp;lt;primary_outcome&amp;gt; but just to let you know all the elements under root node &amp;lt;clinical_study&amp;gt; can have 0 to many occurrences, so during the job design phase we can not guess what elements can have more than 1 occurrences, and we want to get them all. 
&lt;BR /&gt;BTW one more thing not directly related to the this scenario, but a general question, what version (1.0 or 2.0) of XPATH Talend supports to extract the fields from File XML meta data wizard. 
&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; 
&lt;BR /&gt;&amp;lt;clinical_study rank="1"&amp;gt; 
&lt;BR /&gt; 
&lt;BR /&gt; &amp;lt;brief_title&amp;gt;Feasibility Study of Take-Home LAAM Medication - 3&amp;lt;/brief_title&amp;gt; 
&lt;BR /&gt; &amp;lt;official_title&amp;gt;Feasibility Study of Take-Home LAAM Medication&amp;lt;/official_title&amp;gt; 
&lt;BR /&gt; &amp;lt;source&amp;gt;National Institute on Drug Abuse (NIDA)&amp;lt;/source&amp;gt; 
&lt;BR /&gt; &amp;lt;oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;authority&amp;gt;United States: Federal Government&amp;lt;/authority&amp;gt; 
&lt;BR /&gt; &amp;lt;/oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;authority&amp;gt;Germany: Federal Government&amp;lt;/authority&amp;gt; 
&lt;BR /&gt; &amp;lt;/oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Drug use&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Retention&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Increased prosocial behaviors&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Decreased frequency of HIV related behavior&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;enrollment&amp;gt;0&amp;lt;/enrollment&amp;gt; 
&lt;BR /&gt; &amp;lt;condition&amp;gt;Opioid-Related Disorders&amp;lt;/condition&amp;gt; 
&lt;BR /&gt; &amp;lt;intervention&amp;gt; 
&lt;BR /&gt; &amp;lt;intervention_type&amp;gt;Drug&amp;lt;/intervention_type&amp;gt; 
&lt;BR /&gt; &amp;lt;intervention_name&amp;gt;LAAM&amp;lt;/intervention_name&amp;gt; 
&lt;BR /&gt; &amp;lt;/intervention&amp;gt; 
&lt;BR /&gt;&amp;lt;/clinical_study&amp;gt;</description>
    <pubDate>Thu, 22 Oct 2009 17:19:45 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2009-10-22T17:19:45Z</dc:date>
    <item>
      <title>How to loop through nested elements in tInputFileXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341504#M109451</link>
      <description>Hi: I have an xml file that has nested child elements. All these child elements can have 1 and more occurrences. Can some one tell how to set the xpath loop expression for all these nested elements while creating the meta data. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;RJ</description>
      <pubDate>Sat, 16 Nov 2024 13:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341504#M109451</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through nested elements in tInputFileXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341505#M109452</link>
      <description>Hello RJ
&lt;BR /&gt;Can you give us an example of you file and what are your expected result?
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 22 Oct 2009 03:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341505#M109452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-22T03:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through nested elements in tInputFileXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341506#M109453</link>
      <description>Hi: Shong, here is the trim down example. BTW In this example we have more than one occurrences of 2 elements named &amp;lt;oversight_info&amp;gt; and &amp;lt;primary_outcome&amp;gt; but just to let you know all the elements under root node &amp;lt;clinical_study&amp;gt; can have 0 to many occurrences, so during the job design phase we can not guess what elements can have more than 1 occurrences, and we want to get them all. 
&lt;BR /&gt;BTW one more thing not directly related to the this scenario, but a general question, what version (1.0 or 2.0) of XPATH Talend supports to extract the fields from File XML meta data wizard. 
&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; 
&lt;BR /&gt;&amp;lt;clinical_study rank="1"&amp;gt; 
&lt;BR /&gt; 
&lt;BR /&gt; &amp;lt;brief_title&amp;gt;Feasibility Study of Take-Home LAAM Medication - 3&amp;lt;/brief_title&amp;gt; 
&lt;BR /&gt; &amp;lt;official_title&amp;gt;Feasibility Study of Take-Home LAAM Medication&amp;lt;/official_title&amp;gt; 
&lt;BR /&gt; &amp;lt;source&amp;gt;National Institute on Drug Abuse (NIDA)&amp;lt;/source&amp;gt; 
&lt;BR /&gt; &amp;lt;oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;authority&amp;gt;United States: Federal Government&amp;lt;/authority&amp;gt; 
&lt;BR /&gt; &amp;lt;/oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;authority&amp;gt;Germany: Federal Government&amp;lt;/authority&amp;gt; 
&lt;BR /&gt; &amp;lt;/oversight_info&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Drug use&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Retention&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Increased prosocial behaviors&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;measure&amp;gt;Decreased frequency of HIV related behavior&amp;lt;/measure&amp;gt; 
&lt;BR /&gt; &amp;lt;/primary_outcome&amp;gt; 
&lt;BR /&gt; &amp;lt;enrollment&amp;gt;0&amp;lt;/enrollment&amp;gt; 
&lt;BR /&gt; &amp;lt;condition&amp;gt;Opioid-Related Disorders&amp;lt;/condition&amp;gt; 
&lt;BR /&gt; &amp;lt;intervention&amp;gt; 
&lt;BR /&gt; &amp;lt;intervention_type&amp;gt;Drug&amp;lt;/intervention_type&amp;gt; 
&lt;BR /&gt; &amp;lt;intervention_name&amp;gt;LAAM&amp;lt;/intervention_name&amp;gt; 
&lt;BR /&gt; &amp;lt;/intervention&amp;gt; 
&lt;BR /&gt;&amp;lt;/clinical_study&amp;gt;</description>
      <pubDate>Thu, 22 Oct 2009 17:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341506#M109453</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2009-10-22T17:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through nested elements in tInputFileXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341507#M109454</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;BTW one more thing not directly related to the this scenario, but a general question, what version (1.0 or 2.0) of XPATH Talend supports to extract the fields from File XML meta data wizard.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;We use version 1.0 to parse xml file. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;but just to let you know all the elements under root node &amp;lt;clinical_study&amp;gt; can have 0 to many occurrences&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;&amp;lt;clinical_study&amp;gt; must be at leat 1 occurrences, so I think you should wirte some java code to parse the xml file and check it contains &amp;lt;clinical_study&amp;gt;node at the begging of job, if so, do the next processing, otherwise, do nothing. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;BTW In this example we have more than one occurrences of 2 elements named &amp;lt;oversight_info&amp;gt; and &amp;lt;primary_outcome&amp;gt; but just to let you know all the elements&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Using two tFileInputXML to set different loop xpath, &amp;lt;oversight_info&amp;gt; and &amp;lt;primary_outcome&amp;gt;, eg: 
&lt;BR /&gt;"/clinical_study/oversight_info" 
&lt;BR /&gt;"/clinical_study/primary_outcome" 
&lt;BR /&gt;and then merge all the records if needed. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 23 Oct 2009 03:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341507#M109454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-23T03:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to loop through nested elements in tInputFileXML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341508#M109455</link>
      <description>For detailed explanation of reading and processing XML file with multiple nested loops visit the blog post 
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;&lt;A href="http://vikramtakkar.blogspot.in/2013/02/read-xml-having-multiple-nested-loops.html" rel="nofollow noopener noreferrer"&gt;http://vikramtakkar.blogspot.in/2013/02/read-xml-having-multiple-nested-loops.html&lt;/A&gt;&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 27 Feb 2013 06:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-loop-through-nested-elements-in-tInputFileXML/m-p/2341508#M109455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-27T06:53:41Z</dc:date>
    </item>
  </channel>
</rss>

