<?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 replaceSpecialCharForXML Replacing &amp; on escape characters in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261437#M42209</link>
    <description>I have a job that takes in an MySQL input, performs a tmap then produces an xml output file via the advanced xml output plugin (I have selected UTF8 format). I use the replaceSpecialCharForXML function to replace any characters like apostrophe, ampersand, etc into the correct xml format.&lt;BR /&gt;My issue is that this replaceSpecialCharForXML function is replacing the apostrophe and then also replacing the ampersand with another xml escape character.&lt;BR /&gt;Eg, &lt;BR /&gt;Sample data: Mr Jone's&lt;BR /&gt;Expected xml output using replaceSpecialCharForXML: Mr Jone&amp;amp;apos;s&lt;BR /&gt;What is occuring: Mr Jone&amp;amp;apos;s&lt;BR /&gt;Surely this function is not supposed to replace the &amp;amp; that is the apostrophe escape character?&lt;BR /&gt;Any help or advice would be appreciated.&lt;BR /&gt;Thanks&lt;BR /&gt;Steph</description>
    <pubDate>Wed, 22 Aug 2012 00:42:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-22T00:42:33Z</dc:date>
    <item>
      <title>replaceSpecialCharForXML Replacing &amp; on escape characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261437#M42209</link>
      <description>I have a job that takes in an MySQL input, performs a tmap then produces an xml output file via the advanced xml output plugin (I have selected UTF8 format). I use the replaceSpecialCharForXML function to replace any characters like apostrophe, ampersand, etc into the correct xml format.&lt;BR /&gt;My issue is that this replaceSpecialCharForXML function is replacing the apostrophe and then also replacing the ampersand with another xml escape character.&lt;BR /&gt;Eg, &lt;BR /&gt;Sample data: Mr Jone's&lt;BR /&gt;Expected xml output using replaceSpecialCharForXML: Mr Jone&amp;amp;apos;s&lt;BR /&gt;What is occuring: Mr Jone&amp;amp;apos;s&lt;BR /&gt;Surely this function is not supposed to replace the &amp;amp; that is the apostrophe escape character?&lt;BR /&gt;Any help or advice would be appreciated.&lt;BR /&gt;Thanks&lt;BR /&gt;Steph</description>
      <pubDate>Wed, 22 Aug 2012 00:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261437#M42209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-22T00:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: replaceSpecialCharForXML Replacing &amp; on escape characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261438#M42210</link>
      <description>Hi
&lt;BR /&gt;This function works well, 
&lt;BR /&gt;tFileInputDeliimited--main--tMap--main--tLogRow
&lt;BR /&gt;I can see the correct result on the console
&lt;BR /&gt;Mr Jone&amp;amp;apos;s
&lt;BR /&gt;the problem occurs on tAdvancedFileOutputXML component 
&lt;BR /&gt;tFileInputDeliimited--main--tMap--main--tLogRow--tAdvancedFileOutputXML 
&lt;BR /&gt;If I open the xml file in editor, it displays Mr Jone&amp;amp;apos;s, if I open the xml file directly in browser, it displays Mr Jone&amp;amp;apos;s.</description>
      <pubDate>Wed, 22 Aug 2012 07:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261438#M42210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-22T07:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: replaceSpecialCharForXML Replacing &amp; on escape characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261439#M42211</link>
      <description>I don't understand why you escape these special characters, using a tFile(advanced or not)OutputXML should produce a valid XML file and escape them for you. 
&lt;BR /&gt;It seems to me you're doing twice the job and that's why it ends up like this. Furthermore you're using UTF-8 so you shouldn't have the problem I encountered here : 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCksKCAS" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/Encoding-issue-with-tFileOutputXML/td-p/76368&lt;/A&gt;</description>
      <pubDate>Wed, 22 Aug 2012 16:34:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replaceSpecialCharForXML-Replacing-on-escape-characters/m-p/2261439#M42211</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-22T16:34:50Z</dc:date>
    </item>
  </channel>
</rss>

