<?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: using CDATA tags in name fields in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/14932#M8559</link>
    <description>&lt;P&gt;Ampersand is a reserved character in XML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To use it you have to first clean the input to escape it by using &lt;FONT color="#000000" size="2" face="verdana"&gt;&amp;amp;amp;&lt;/FONT&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I always found it funny that to escape an ampersand you have to use an ampersand)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WHeis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jul 2011 13:54:38 GMT</pubDate>
    <dc:creator>WHeisenberg</dc:creator>
    <dc:date>2011-07-17T13:54:38Z</dc:date>
    <item>
      <title>using CDATA tags in name fields</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/14890#M8538</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Newbie here... been integrating CIM api's for about 2 months... anyway, ran into an issue in using the&lt;/P&gt;&lt;P&gt;"createCustomerProfileRequest﻿"&amp;nbsp; CIM api when there was an ampersand &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; &amp;nbsp;&amp;nbsp; included in the company name&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;                                          
&amp;lt;createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;  
&amp;lt;merchantAuthentication&amp;gt;                                                      
&amp;lt;name&amp;gt;xxxxxxxxxxx&amp;lt;/name&amp;gt;                                                       
&amp;lt;transactionKey&amp;gt;xxxxxxxxxxxxxxx&amp;lt;/transactionKey&amp;gt;                           
&amp;lt;/merchantAuthentication&amp;gt;                                                     
&amp;lt;refId&amp;gt;xxxxxxxxxxxxxxxxxxxxxx&amp;lt;/refId&amp;gt;                                             
&amp;lt;profile&amp;gt;                                                                     
&amp;lt;merchantCustomerId&amp;gt;121121&amp;lt;/merchantCustomerId&amp;gt;                            
&amp;lt;description&amp;gt;SO121121&amp;lt;/description&amp;gt;                                         
&amp;lt;paymentProfiles&amp;gt;                                                             
&amp;lt;billTo&amp;gt;                                                                  
&amp;lt;company&amp;gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &amp;amp; zzz&amp;lt;/company&amp;gt;                            
&amp;lt;address&amp;gt;755&amp;lt;/address&amp;gt;                                                  
&amp;lt;zip&amp;gt;10466&amp;lt;/zip&amp;gt;                                                        
&amp;lt;/billTo&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;(note that the break shown above AFTER the &amp;amp; does not exist in the real XML)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error returned is "E00003&amp;nbsp; An error occurred while parsing Entity Name. Line 13, position 39.&amp;nbsp; ﻿".&lt;/P&gt;&lt;P&gt;If i count out the line and position, that points to the ampersnad in the &amp;lt;company&amp;gt; tag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My thought was that I could use the "CDATA" tag like I see in some of the API examples in the manual, usually shown in the &amp;lt;extraOptions&amp;gt;﻿.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I did that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   &amp;lt;company&amp;gt;&amp;lt;![CDATA[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx &amp;amp; zzz]]&amp;gt;&amp;lt;/company&amp;gt;  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error returned is "E00003 Invalid character in the given encoding. Line 13, position 20. ﻿"&amp;nbsp; which points to the&lt;/P&gt;&lt;P&gt;which points to the [&amp;nbsp; just prior to the CDATA ﻿.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we use CDATA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to wrapper special characters in the actual data values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API works fine if the ampersand is not embedded in the data.&amp;nbsp;&amp;nbsp; I don't want to strip it out, because we have&lt;/P&gt;&lt;P&gt;customers give us the name off of the card and it does have an ampersand as part of the name that is on the card.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help, including pointing me to the documentation that explains this, would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 19:58:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/14890#M8538</guid>
      <dc:creator>jrstaub</dc:creator>
      <dc:date>2011-07-15T19:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: using CDATA tags in name fields</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/14932#M8559</link>
      <description>&lt;P&gt;Ampersand is a reserved character in XML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To use it you have to first clean the input to escape it by using &lt;FONT color="#000000" size="2" face="verdana"&gt;&amp;amp;amp;&lt;/FONT&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I always found it funny that to escape an ampersand you have to use an ampersand)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WHeis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2011 13:54:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/14932#M8559</guid>
      <dc:creator>WHeisenberg</dc:creator>
      <dc:date>2011-07-17T13:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: using CDATA tags in name fields</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/38411#M21016</link>
      <description>&lt;P&gt;This is a bug in the AuthorizeNet SDK library (at least in 1.4.6). The library is not properly escaping XML attribute values or element text values when serializing XML documents to Strings.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 20:00:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/38411#M21016</guid>
      <dc:creator>jjory</dc:creator>
      <dc:date>2014-01-14T20:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: using CDATA tags in name fields</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/40188#M21857</link>
      <description>&lt;P&gt;This issue is still open but reported in GitHub. &amp;nbsp;&lt;A href="https://github.com/AuthorizeNet/sdk-java/issues/4" target="_blank"&gt;https://github.com/AuthorizeNet/sdk-java/issues/4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2014 13:47:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields/m-p/40188#M21857</guid>
      <dc:creator>RichardH</dc:creator>
      <dc:date>2014-04-02T13:47:33Z</dc:date>
    </item>
  </channel>
</rss>

