<?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 How to get name of xml node with tExtractXmlFields in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360382#M124980</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i'm trying to extract the name of an Xml Node with tExtractXmlFields.&lt;/P&gt;
&lt;P&gt;This works fine for my first usecase, but for the second use cases i'm facing a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Problem is, that the node i'm trying to get the name from has a xmlns-attribute.&lt;/P&gt;
&lt;P&gt;Error:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;myFunctionResponse xmlns="&lt;A href="http://tempuri.org/Webservice/Function" target="_blank" rel="nofollow noopener noreferrer"&gt;http://tempuri.org/Webservice/Function&lt;/A&gt;"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Works fine:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;soap:Envelope ... &lt;SPAN&gt;&amp;nbsp;xmlns:web="&lt;A href="http://tempuri.org/Webservice/Function" target="_blank" rel="nofollow noopener noreferrer"&gt;http://tempuri.org/Webservice/Function&lt;/A&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;web:myFunctionResponse&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting the following error:&lt;/P&gt;
&lt;P&gt;Exception in component tExtractXMLField_1&lt;BR /&gt;java.lang.ArrayIndexOutOfBoundsException: -1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My XPath-Query:&lt;/P&gt;
&lt;P&gt;"name(//soap:Envelop/soap:Body/*[1])"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also tried with:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"local-name(//soap:Envelop/soap:Body/*[1])"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"name(//soap:Envelop/soap:Body/*[@xmlns='&lt;A href="http://tempuri.org/Webservice/Function" target="_blank" rel="nofollow noopener noreferrer"&gt;http://tempuri.org/Webservice/Function&lt;/A&gt;'])"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone can help me on how to fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Dominik&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2017 09:39:55 GMT</pubDate>
    <dc:creator>droth</dc:creator>
    <dc:date>2017-12-08T09:39:55Z</dc:date>
    <item>
      <title>How to get name of xml node with tExtractXmlFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360382#M124980</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i'm trying to extract the name of an Xml Node with tExtractXmlFields.&lt;/P&gt;
&lt;P&gt;This works fine for my first usecase, but for the second use cases i'm facing a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Problem is, that the node i'm trying to get the name from has a xmlns-attribute.&lt;/P&gt;
&lt;P&gt;Error:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;myFunctionResponse xmlns="&lt;A href="http://tempuri.org/Webservice/Function" target="_blank" rel="nofollow noopener noreferrer"&gt;http://tempuri.org/Webservice/Function&lt;/A&gt;"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Works fine:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;soap:Envelope ... &lt;SPAN&gt;&amp;nbsp;xmlns:web="&lt;A href="http://tempuri.org/Webservice/Function" target="_blank" rel="nofollow noopener noreferrer"&gt;http://tempuri.org/Webservice/Function&lt;/A&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;web:myFunctionResponse&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting the following error:&lt;/P&gt;
&lt;P&gt;Exception in component tExtractXMLField_1&lt;BR /&gt;java.lang.ArrayIndexOutOfBoundsException: -1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My XPath-Query:&lt;/P&gt;
&lt;P&gt;"name(//soap:Envelop/soap:Body/*[1])"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also tried with:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"local-name(//soap:Envelop/soap:Body/*[1])"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"name(//soap:Envelop/soap:Body/*[@xmlns='&lt;A href="http://tempuri.org/Webservice/Function" target="_blank" rel="nofollow noopener noreferrer"&gt;http://tempuri.org/Webservice/Function&lt;/A&gt;'])"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone can help me on how to fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Dominik&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 09:39:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360382#M124980</guid>
      <dc:creator>droth</dc:creator>
      <dc:date>2017-12-08T09:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get name of xml node with tExtractXmlFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360383#M124981</link>
      <description>&lt;P&gt;Does nobody know how to solve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Dominik&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:51:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360383#M124981</guid>
      <dc:creator>droth</dc:creator>
      <dc:date>2017-12-18T15:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get name of xml node with tExtractXmlFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360384#M124982</link>
      <description>&lt;P&gt;Found out the solution by myself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just put "name(...)" around the xpath expression like "name(//*[1])".&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 15:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360384#M124982</guid>
      <dc:creator>droth</dc:creator>
      <dc:date>2018-07-18T15:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get name of xml node with tExtractXmlFields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360385#M124983</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/0053p000007LLWaAAO"&gt;@droth&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Found out the solution by myself.&lt;/P&gt; 
 &lt;P&gt;Just put "name(...)" around the xpath expression like "name(//*[1])".&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;Make sure that "Get Nodes" is checked too.&lt;BR /&gt;explications here : &lt;A href="https://community.qlik.com/s/feed/0D73p000004kO4RCAU#M55969" target="_blank" rel="noopener"&gt;https://community.talend.com/t5/Design-and-Development/Issue-extracting-XML-node-names-or-element-name/m-p/97317#M55969&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 18:09:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-name-of-xml-node-with-tExtractXmlFields/m-p/2360385#M124983</guid>
      <dc:creator>vincentB1</dc:creator>
      <dc:date>2019-02-08T18:09:46Z</dc:date>
    </item>
  </channel>
</rss>

