2013-05-14 53 views
0

嗯,我有點新的Android,我試圖得到一個http答案的值。但我從來沒有使用過這個XML的東西。 Web服務的如何提取使用android java的http xml答案的值

例子:http://freegeoip.net/xml/123.123.123.123

這是這裏

<Response> 
<Ip>123.123.123.123</Ip> 
<CountryCode>CN</CountryCode> 
<CountryName>China</CountryName> 
<RegionCode>22</RegionCode> 
<RegionName>Beijing</RegionName> 
<City>Beijing</City> 
<ZipCode/> 
<Latitude>39.9289</Latitude> 
<Longitude>116.388</Longitude> 
<MetroCode/> 
</Response> 

結果如何獲得COUNTRYCODE的價值,regioncode等等

+0

搜索* XPath *,它應該可以幫到你。 – Maroun

+0

@Maroun Maroun舉個例子 – Jmocke

回答