<?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 Reading Multiple XMLs and Validating against XSD Schema in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350174#M117057</link>
    <description>Hi, 
&lt;BR /&gt;I have a case in which I need to have a poll folder which would read available XML files, queue them, validate them using XSD schema then do other processing. I used the following components but couldn't get the results I want: 
&lt;BR /&gt;1. tWaitForFile: poll folder. 
&lt;BR /&gt;2. tXSDValidator: to validate XML files. 
&lt;BR /&gt;I found some shortcomings (either in my knowledge of Talend's components or in components themselves): 
&lt;BR /&gt;1. tWaitForFile: after discovering a file and processing it, I want to delete it from the poll folder or move it to another directory for archiving but I couldn't find component attribute to support these operations. 
&lt;BR /&gt;2. tXSDValidator: Takes a specific instance of and XML file. The path of the file is hardcoded which means I can't iterate over XML files which are queued by some other components. Also, there is no fine-grained error handling such as fatal error handling, handling error at a specific XML element etc... 
&lt;BR /&gt;How can I overcome the above mentioned shortcomings? Are there other components which support my requirements? Should I assemble components in a different way? 
&lt;BR /&gt;I appreciate your time answering my questions.</description>
    <pubDate>Sat, 16 Nov 2024 13:42:24 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2024-11-16T13:42:24Z</dc:date>
    <item>
      <title>Reading Multiple XMLs and Validating against XSD Schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350174#M117057</link>
      <description>Hi, 
&lt;BR /&gt;I have a case in which I need to have a poll folder which would read available XML files, queue them, validate them using XSD schema then do other processing. I used the following components but couldn't get the results I want: 
&lt;BR /&gt;1. tWaitForFile: poll folder. 
&lt;BR /&gt;2. tXSDValidator: to validate XML files. 
&lt;BR /&gt;I found some shortcomings (either in my knowledge of Talend's components or in components themselves): 
&lt;BR /&gt;1. tWaitForFile: after discovering a file and processing it, I want to delete it from the poll folder or move it to another directory for archiving but I couldn't find component attribute to support these operations. 
&lt;BR /&gt;2. tXSDValidator: Takes a specific instance of and XML file. The path of the file is hardcoded which means I can't iterate over XML files which are queued by some other components. Also, there is no fine-grained error handling such as fatal error handling, handling error at a specific XML element etc... 
&lt;BR /&gt;How can I overcome the above mentioned shortcomings? Are there other components which support my requirements? Should I assemble components in a different way? 
&lt;BR /&gt;I appreciate your time answering my questions.</description>
      <pubDate>Sat, 16 Nov 2024 13:42:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350174#M117057</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Multiple XMLs and Validating against XSD Schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350175#M117058</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;1. tWaitForFile: after discovering a file and processing it, I want to delete it from the poll folder or move it to another directory for archiving but I couldn't find component attribute to support these operations.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;You can use the tFileCopy component to copy the file and delete it. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;2. tXSDValidator: Takes a specific instance of and XML file. The path of the file is hardcoded which means I can't iterate over XML files which are queued by some other components. Also, there is no fine-grained error handling such as fatal error handling, handling error at a specific XML element etc...&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Don't hardcode the file path, there is a global var 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;(String)globalMap.get("tWaitForFile_1_CREATED_FILE")), with which you can iterate all new created file on tXSDValidator.eg: 
&lt;BR /&gt;tWaitForFile--iterate--&amp;gt;tXSDValidator 
&lt;BR /&gt;on the xml file field of tXSDValidator, type in 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;(String)globalMap.get("tWaitForFile_1_CREATED_FILE")) 
&lt;BR /&gt;tip: on any text field, press ctrl+bank space, you will see a list of global vars. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 02 Nov 2009 03:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350175#M117058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-02T03:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Multiple XMLs and Validating against XSD Schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350176#M117059</link>
      <description>Thank you Shong. Your tips were of a great help to me especially the concept of global variables.
&lt;BR /&gt;I still have some issues in this topic.
&lt;BR /&gt;* I observed that whenever I have an exception, the job exits. This is an undesirable behavior since there are recoverable exceptions with which the job can continue peacefully. Isn't there a way to configure a job so that it doesn't exit on certain exceptions (e.g., FileNotFoundException)?
&lt;BR /&gt;* tXSDValidator: I expected to have two handler branches in this component, one for happy scenario in which the XML file was valid and one for failure scenario in which the XML file was invalid. However, I didn't find any available action that I can use based on the outcome of this component (except printing messages to console). How can I implement those two handlers based on the outcome of tXSDValidator?</description>
      <pubDate>Sat, 07 Nov 2009 06:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350176#M117059</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2009-11-07T06:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Multiple XMLs and Validating against XSD Schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350177#M117060</link>
      <description>Reminder!</description>
      <pubDate>Sat, 14 Nov 2009 06:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350177#M117060</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2009-11-14T06:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Multiple XMLs and Validating against XSD Schema</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350178#M117061</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;* I observed that whenever I have an exception, the job exits. This is an undesirable behavior since there are recoverable exceptions with which the job can continue peacefully. Isn't there a way to configure a job so that it doesn't exit on certain exceptions (e.g., FileNotFoundException)?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Put tXSDValidator to a child job, use a tRunJob to run the child job and uncheck 'die on child error' option in the father job. eg: 
&lt;BR /&gt;In father job: tWaitForFile--iterate--&amp;gt;tRunJob 
&lt;BR /&gt;In child job: tXSDValidator 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;How can I implement those two handlers based on the outcome of tXSDValidator?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Using the global var 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;(String)globalMap.get("tXSDValidator_1_ERROR_MESSAGE")) 
&lt;BR /&gt;it returns 'file is invalid' if it is failed and returns 'file is valid' if it is ok. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 16 Nov 2009 02:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Reading-Multiple-XMLs-and-Validating-against-XSD-Schema/m-p/2350178#M117061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-16T02:43:07Z</dc:date>
    </item>
  </channel>
</rss>

