title: nsdata to nsstring to nsdata
body: <p>I am calling the web services. The web service returns data in xml format. Now the problem is the xml data is not being received in proper format. In place of "&lt;", ">" it returns in html form.</p>
  
  <p>So I assigned the xmldata to a NsMutableString and replaced the escape characters so that the format of xml data is proper. Then I reassigned the NSMutableString to NSData so that I can parse the tags. but the problem is the xmlparser stops right where the xml data is, where I replaced the tags. It doesn't go further. What is going on?</p>
  
  <p>This is the xml response from web service that I called.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
  &lt;SOAP-ENV:Body&gt;
  &lt;ns1:GetCustomerInfoResponse xmlns:ns1="http://aa.somewebservice.com/phpwebservice"&gt;
  &lt;return xsi:type="xsd:string"&gt;
      &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;customer&amp;gt;&amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;&amp;lt;customername&amp;gt;Hitesh&amp;lt;/customername&amp;gt;&amp;lt;phonenumber&amp;gt;98989898&amp;lt;/phonenumber&amp;gt;&amp;lt;/customer&amp;gt;
  &lt;/return&gt;
  &lt;/ns1:GetCustomerInfoResponse&gt;
  &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>And this is after I replaced the tags.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
  &lt;SOAP-ENV:Body&gt;
  &lt;ns1:GetCustomerInfoResponse xmlns:ns1="http://aa.somewebservice.com/phpwebservice"&gt;
  &lt;return xsi:type="xsd:string"&gt;
  &lt;?xml version="1.0" encoding="utf-8"?&gt; 
   &lt;customer&gt;&lt;id&gt;1&lt;/id&gt;&lt;customername&gt;Hitesh&lt;/customername&gt;&lt;phonenumber&gt;98989898&lt;/phonenumber&gt;&lt;/customer&gt;
  &lt;/return&gt;
  &lt;/ns1:GetCustomerInfoResponse&gt;
  &lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>Now the problem is while parsing the xml data, the parser only goes up to return tag. And then it is stuck there.</p>