在javascript中如何得到xml子节点下的子节点
xml吧
全部回复
仅看楼主
level 1
- <province>
<city>杭州</city>
<county>西湖</county>
<county>钱塘江</county>
<county>灵隐寺</county>
<city>温州</city>
<county>雁荡山</county>
<county>江心屿</county>
<county>文成飞瀑</county>
<city>宁波</city>
<county>九龙湖</county>
<county>松兰山</county>
<county>奉化溪口</county>
</province>
即如何得到city温州下的所有county?
2012年07月08日 09点07分 1
level 1
//JDOM解析
Element root = document.getRootElement() ;
List<Element> allplus = root.getChildren() ;
然后通过迭代 可以得到
2012年08月04日 12点08分 2
1