如何解析从webservice返回的xml。
<Locations>
<Location>
<Id>666</Id>
<Latitude>38.5699</Latitude>
<Longitude>-121.381</Longitude>
<Address>3638 American River Dr</Address>
<City>Sacramento</City>
<Country>US</Country>
</Location>
<Location>
<Id>665</Id>
<Latitude>38.5699</Latitude>
<Longitude>-121.381</Longitude>
<Address>3638 American River Dr</Address>
<City>Sacramento</City>
<Country>US</Country>
</Location>
<Location>
<Id>664</Id>
<Latitude>38.5699</Latitude>
<Longitude>-121.381</Longitude>
<Address>3638 American River Dr</Address>
<City>Sacramento</City>
<Country>US</Country>
</Location>
</Locations>
请帮助我,我如何获得个人身份和其他属性?
答案 0 :(得分:0)
如果使用jQuery,请查看此处 http://api.jquery.com/jQuery.parseXML/
否则只是在这个网站上搜索,有很多例子 https://stackoverflow.com/search?q=parse+xml+javascript