API throws error when passing (&) ampersand and (%) percent via XML

API throws error when passing (&) ampersand and (%) percent via XML

I have the same problem as described in the title and in this related discussion.

The above referenced discussion seems to have been moved offline. I was wondering what the resolution was?

In short, I am trying to pass (via XML) to the API a URL containing query parameters using the ampersand.

The API then throws a 2830 error.

Same problem happens when I encode the “&” using “&” — as the percent symbol seems to trigger the identical error.

Can somebody please help?

Note: I have unsuccessfully tried the following solutions:
1. Encasing the data inside a CDATA wrapper as follows:
<value><![CDATA[http://zoho.com?x=10&y=20]]></value>
2. Substituting for the ampersand, the following strings:
&amp;
&amp;amp;
&<br>&#038
&#038;

In short nothing works. The & and % characters are creating the problem.

Please help.