<?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: Remove special character (horizontal tab) from xml file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354370#M120355</link>
    <description>&lt;P&gt;I've just looked at your job and think you are probably right. What exactly do you have in your tFixedFlow component? I doubt it is the content of the file that the SCP component has downloaded. You need to read that into the job after downloading it.&lt;/P&gt;</description>
    <pubDate>Sat, 14 Apr 2018 18:03:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-14T18:03:57Z</dc:date>
    <item>
      <title>Remove special character (horizontal tab) from xml file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354367#M120352</link>
      <description>&lt;P&gt;I have used following tJava &lt;U&gt;replaceAll&lt;/U&gt; code to replace horizontal tab (\t) with an empty string. Here is my code:&lt;/P&gt; 
&lt;P&gt;if (input_row.filename!=null) {&lt;/P&gt; 
&lt;P&gt;context.file_name = input_row.filename.replaceAll("\\n","");&lt;/P&gt; 
&lt;P&gt;char asciiChar = (char)9;&lt;BR /&gt;String replaceString = ""+asciiChar;&lt;BR /&gt;context.file_name= input_row.filename.replaceAll(replaceString, "");&lt;BR /&gt;context.file_name = input_row.filename.replaceAll("\t","");&lt;BR /&gt;context.file_name = input_row.filename.replaceAll("\\t","");}&lt;BR /&gt;else&lt;BR /&gt;{context.file_name = input_row.filename;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But this code didn't replace horizontal tabs in my files. I still think Talend can replace special characters in xml files. I have attached my job's screenshots&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LtXf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152114i9E6C058FBB3363C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LtXf.png" alt="0683p000009LtXf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354367#M120352</guid>
      <dc:creator>SJ3</dc:creator>
      <dc:date>2024-11-16T08:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove special character (horizontal tab) from xml file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354368#M120353</link>
      <description>&lt;P&gt;Your code is not doing what you think. All you need is below (assuming you also want to remove new lines as well as tabs)....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;if (input_row.filename!=null) {
     context.file_name = input_row.filename.replaceAll("\n","");
     context.file_name =context.file_name.replaceAll("\t","");
}else{
     context.file_name = input_row.filename;
}&lt;/PRE&gt; 
&lt;P&gt;The problem with your code was that you were overwriting your context.file_name with the result of&amp;nbsp;attempting to remove&amp;nbsp;different values. For example, if you have a variable "myString" which holds "abcdef" and you use the following code....&lt;/P&gt; 
&lt;PRE&gt;String myString = "abcdef";
context.file_name = myString.replaceAll("a","");
context.file_name = myString.replaceAll("b","");
context.file_name = myString.replaceAll("c","");
context.file_name = myString.replaceAll("d","");&lt;/PRE&gt; 
&lt;P&gt;....the result would actually be "abcef" because you are only removing the last value. To remove ALL of the values you would need to do this...&lt;/P&gt; 
&lt;PRE&gt;String myString = "abcdef";
context.file_name = myString.replaceAll("a","");
context.file_name = context.file_name.replaceAll("b",""); &lt;BR /&gt;context.file_name = context.file_name.replaceAll("c",""); &lt;BR /&gt;context.file_name = context.file_name.replaceAll("d","");&lt;/PRE&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>Mon, 09 Apr 2018 13:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354368#M120353</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-09T13:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove special character (horizontal tab) from xml file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354369#M120354</link>
      <description>&lt;P&gt;Hi, thanks for your post! but I am still getting horizontal tabs (\t) in my files:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;\t&amp;lt;/Head&amp;gt; \t&amp;lt;Form&amp;gt; \t\t&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am not sure if it's actually reading my files as i&lt;/SPAN&gt;&lt;SPAN&gt;t's not replacing this character.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sony&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 20:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354369#M120354</guid>
      <dc:creator>SJ3</dc:creator>
      <dc:date>2018-04-13T20:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Remove special character (horizontal tab) from xml file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354370#M120355</link>
      <description>&lt;P&gt;I've just looked at your job and think you are probably right. What exactly do you have in your tFixedFlow component? I doubt it is the content of the file that the SCP component has downloaded. You need to read that into the job after downloading it.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Apr 2018 18:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Remove-special-character-horizontal-tab-from-xml-file/m-p/2354370#M120355</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-14T18:03:57Z</dc:date>
    </item>
  </channel>
</rss>

