-1

xml データを返す Web サービスを呼び出しています。xml データを受け取ると、すべて歪んでいます。"<"、">"、" '" などのすべてのエスケープ文字は、html 形式に変換されます。

すなわち ≶ > と ".

そのため、パーサーはタグを認識できません。

これはWebサービスからの私の応答です

<?xml version="1.0" encoding="ISO-8859-1"?><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/">
<SOAP-ENV:Body>
<ns1:GetCustomerInfoResponse xmlns:ns1="http://qa2.alliancetek.com/phpwebservice">
<return xsi:type="xsd:string">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&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;
</return>
</ns1:GetCustomerInfoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

return タグ間のコンテンツは xml データです。xml データを NSMutableString 変数にコピーし、文字の置換操作を実行しても、変更されませんでした。

4

1 に答える 1

0

≶ &tg; の出現を置き換えてください。および " 空白を使用します。

于 2011-02-22T05:46:57.647 に答える