<?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: Talend's FileInputXML and Xpath 2.0 in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339957#M108039</link>
    <description>Hello 
&lt;BR /&gt;Talend doesn't support a xpath as you set, for now, you can set the xpath as below, extract all the records and filter the records on tMap
&lt;BR /&gt;/root/body/data/invoice
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
    <pubDate>Wed, 21 Oct 2009 09:19:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-10-21T09:19:11Z</dc:date>
    <item>
      <title>Talend's FileInputXML and Xpath 2.0</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339956#M108038</link>
      <description>Hey folks, 
&lt;BR /&gt;I'm trying to parse a xml input file via the FileInputXML component. However, my Xpath 2.0 expression (tested in XMLSpy) will not work in Talend: 
&lt;BR /&gt;- The xpath is as follows in XML Spy: 
&lt;BR /&gt; (if(exists(//data/invoice)) then (//data/invoice) else (//data/invoice)) 
&lt;BR /&gt;- The xpath is as follows in Talend (escaped cause its a String in Talend): 
&lt;BR /&gt; "(if(exists(//data/invoice)) then (//data/invoice) else (//data/invoice))" 
&lt;BR /&gt;The exception I get indicates (imho) a mismatch between the component and xpath 2.0. So my question is a) does de component actually support xpath 2.0 and b1) if not, is there a viable alternative or b2) it does, what am I doing wrong? 
&lt;BR /&gt;I've added 2 example input xml files and the expected result in pseudo xml to indicate what I'm trying to achieve: 
&lt;BR /&gt;- In the non YK file there are multiple invoice elements, none of them with an object-id that starts with YK. So I expect Talend to loop over each invoice element. 
&lt;BR /&gt;- In the YK file there are also multiple invoice elements, but one of them has an object-id that starts with YK. So I expect Talend to only that specific invoice element. 
&lt;BR /&gt;The Talend exception: javax.xml.transform.TransformerException: Could not find function: if 
&lt;BR /&gt; at com.sun.org.apache.xpath.internal.compiler.XPathParser.error 
&lt;BR /&gt;I hope I explained it enough and thanks in advance for the help. 
&lt;BR /&gt;Regards Roel</description>
      <pubDate>Sat, 16 Nov 2024 13:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339956#M108038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Talend's FileInputXML and Xpath 2.0</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339957#M108039</link>
      <description>Hello 
&lt;BR /&gt;Talend doesn't support a xpath as you set, for now, you can set the xpath as below, extract all the records and filter the records on tMap
&lt;BR /&gt;/root/body/data/invoice
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Wed, 21 Oct 2009 09:19:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339957#M108039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-21T09:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Talend's FileInputXML and Xpath 2.0</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339958#M108040</link>
      <description>Maybe you can request for this feature in the bug tracker, it would need to use the library saxon (for instance) for parsing.</description>
      <pubDate>Wed, 21 Oct 2009 09:51:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-s-FileInputXML-and-Xpath-2-0/m-p/2339958#M108040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-21T09:51:06Z</dc:date>
    </item>
  </channel>
</rss>

