SOAP message with less-than symbol causes Invalid XML error
<p>I am working on an iPhone application that requires the use of a third part SOAP web service (I know, SOAP is not preferred, it is just what I am stuck with). Basically user entered data is sent to the web service and I am finding that certain characters will not send and cause the error message below. The one character that causes this that I have run into so far is <code>&lt;</code> . Without the characters it works fine. I want to have the ability to send such characters. I am sending the string with UTF8StringEncoding. Perhaps there is something I can modify to allow such characters?</p>

<pre><code>[req setHTTPBody: [soapMsg dataUsingEncoding:NSUTF8StringEncoding]]; 
</code></pre>

<p>Error:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;SOAP-ENV:Body&gt;&lt;SOAP-ENV:Fault&gt;&lt;faultcode&gt;Sender&lt;/faultcode&gt;&lt;faultstring&gt;Invalid XML&lt;/faultstring&gt;&lt;/SOAP-ENV:Fault&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
</code></pre>
