<?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 do logical judgement with component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247313#M32539</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a xml data like below. I am using tExtractXMLField to extract xml to a row. But&amp;nbsp;tExtractXMLField is only able to set one loop xpath query option, that means if I use /xml/header &amp;nbsp;to get errcode &amp;nbsp;and then I am not able to get the fields under xpath /xml/content/group.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My case is do different operation according to errcode. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Who can tell me how to design this?&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;PRE&gt;&amp;lt;xml&amp;gt;
  &amp;lt;header&amp;gt;
    &amp;lt;errcode&amp;gt;ERR000&amp;lt;/errcode&amp;gt;
    &amp;lt;msg&amp;gt;success&amp;lt;/msg&amp;gt;
  &amp;lt;/header&amp;gt;
  &amp;lt;content&amp;gt;
    &amp;lt;group&amp;gt;
      &amp;lt;creationtime&amp;gt;2016-03-22 13:35:46&amp;lt;/creationtime&amp;gt;
      &amp;lt;pk_supplier&amp;gt;1001QW10000000004CT2&amp;lt;/pk_supplier&amp;gt;
      &amp;lt;vbillcode&amp;gt;CD2016032200000001&amp;lt;/vbillcode&amp;gt;
      &amp;lt;modifiedtime&amp;gt;2016-03-22 13:36:17&amp;lt;/modifiedtime&amp;gt;
      &amp;lt;billmaker&amp;gt;1001QW1000000000017S&amp;lt;/billmaker&amp;gt;
    &amp;lt;/group&amp;gt;
    &amp;lt;group&amp;gt;
      &amp;lt;creationtime&amp;gt;2016-03-23 16:05:30&amp;lt;/creationtime&amp;gt;
      &amp;lt;pk_supplier&amp;gt;1001QW10000000004CRS&amp;lt;/pk_supplier&amp;gt;
      &amp;lt;vbillcode&amp;gt;CD2016032300000006&amp;lt;/vbillcode&amp;gt;
      &amp;lt;modifiedtime&amp;gt;null&amp;lt;/modifiedtime&amp;gt;
      &amp;lt;billmaker&amp;gt;1001QW1000000000BT8L&amp;lt;/billmaker&amp;gt;
    &amp;lt;/group&amp;gt;
  &amp;lt;/content&amp;gt;
&amp;lt;/xml&amp;gt;&lt;/PRE&gt;
&lt;P&gt;If error occurs , the response is like below&lt;/P&gt;
&lt;PRE&gt;&amp;lt;xml&amp;gt;
  &amp;lt;header&amp;gt;
    &amp;lt;errcode&amp;gt;ERR001&amp;lt;/errcode&amp;gt;
    &amp;lt;msg&amp;gt;something wrong&amp;lt;/msg&amp;gt;
  &amp;lt;/header&amp;gt;
&amp;lt;xml&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG border="0" /&gt;&lt;/P&gt;
&lt;P&gt;I 'd like to add if judgement after a extract errcode from xml, if the errcode equals err000 then extract the fields under xpath /xml/content/group to activemq , else just log it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:39:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T04:39:49Z</dc:date>
    <item>
      <title>how to do logical judgement with component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247313#M32539</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a xml data like below. I am using tExtractXMLField to extract xml to a row. But&amp;nbsp;tExtractXMLField is only able to set one loop xpath query option, that means if I use /xml/header &amp;nbsp;to get errcode &amp;nbsp;and then I am not able to get the fields under xpath /xml/content/group.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My case is do different operation according to errcode. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Who can tell me how to design this?&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;PRE&gt;&amp;lt;xml&amp;gt;
  &amp;lt;header&amp;gt;
    &amp;lt;errcode&amp;gt;ERR000&amp;lt;/errcode&amp;gt;
    &amp;lt;msg&amp;gt;success&amp;lt;/msg&amp;gt;
  &amp;lt;/header&amp;gt;
  &amp;lt;content&amp;gt;
    &amp;lt;group&amp;gt;
      &amp;lt;creationtime&amp;gt;2016-03-22 13:35:46&amp;lt;/creationtime&amp;gt;
      &amp;lt;pk_supplier&amp;gt;1001QW10000000004CT2&amp;lt;/pk_supplier&amp;gt;
      &amp;lt;vbillcode&amp;gt;CD2016032200000001&amp;lt;/vbillcode&amp;gt;
      &amp;lt;modifiedtime&amp;gt;2016-03-22 13:36:17&amp;lt;/modifiedtime&amp;gt;
      &amp;lt;billmaker&amp;gt;1001QW1000000000017S&amp;lt;/billmaker&amp;gt;
    &amp;lt;/group&amp;gt;
    &amp;lt;group&amp;gt;
      &amp;lt;creationtime&amp;gt;2016-03-23 16:05:30&amp;lt;/creationtime&amp;gt;
      &amp;lt;pk_supplier&amp;gt;1001QW10000000004CRS&amp;lt;/pk_supplier&amp;gt;
      &amp;lt;vbillcode&amp;gt;CD2016032300000006&amp;lt;/vbillcode&amp;gt;
      &amp;lt;modifiedtime&amp;gt;null&amp;lt;/modifiedtime&amp;gt;
      &amp;lt;billmaker&amp;gt;1001QW1000000000BT8L&amp;lt;/billmaker&amp;gt;
    &amp;lt;/group&amp;gt;
  &amp;lt;/content&amp;gt;
&amp;lt;/xml&amp;gt;&lt;/PRE&gt;
&lt;P&gt;If error occurs , the response is like below&lt;/P&gt;
&lt;PRE&gt;&amp;lt;xml&amp;gt;
  &amp;lt;header&amp;gt;
    &amp;lt;errcode&amp;gt;ERR001&amp;lt;/errcode&amp;gt;
    &amp;lt;msg&amp;gt;something wrong&amp;lt;/msg&amp;gt;
  &amp;lt;/header&amp;gt;
&amp;lt;xml&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG border="0" /&gt;&lt;/P&gt;
&lt;P&gt;I 'd like to add if judgement after a extract errcode from xml, if the errcode equals err000 then extract the fields under xpath /xml/content/group to activemq , else just log it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247313#M32539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to do logical judgement with component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247314#M32540</link>
      <description>you may cascase loop on multiples tXmlMap using document to transfert Xml element</description>
      <pubDate>Tue, 17 Sep 2019 14:39:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247314#M32540</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2019-09-17T14:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to do logical judgement with component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247315#M32541</link>
      <description>Hi Francois, Yeah agree with you, for now tExtractXMLField already convert xml string to document so that i can get the xml field in a row. Could you give some detail teach me how to make "if" judgement , like "run if "</description>
      <pubDate>Tue, 17 Sep 2019 15:03:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-do-logical-judgement-with-component/m-p/2247315#M32541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-17T15:03:24Z</dc:date>
    </item>
  </channel>
</rss>

