0
調用web方法後,將返回一個XML字符串作爲響應。 了android端代碼是這樣的:如何解析android開發中從web服務返回的ksoap2響應?
SoapPrimitive response = (SoapPrimitive) ws.envelope.getResponse();
和XML是這樣的:
<string xmlns="http://tempuri.org/">
[{"ID":"[email protected]","float_latitude":22.338,"float_longitude":114.169}, {"ID":"[email protected]","float_latitude":22.33974,"float_longitude":114.169456}, {"ID":"[email protected]","float_latitude":22.3384857,"float_longitude":114.1691}, {"ID":"[email protected]","float_latitude":50,"float_longitude":100}]
</string>
我想
- 的id號返回
- 保存LAT並長期以ID爲本地變量
它完美對我的工作!我已經搜索瞭如何解析ksoap2 xml很多次,並找不到解決方案因爲我搞砸了XML和JSON。非常感謝您 – Chleung49 2012-03-27 23:23:25
沒問題我很高興能夠提供幫助。 – JakeWilson801 2012-03-28 00:10:25