<?xml version="1.0" encoding="UTF-8"?>
<Country>
<States>
<County>
<popularity>39</popularity>
<name>Orange</name>
<id>13811</id>
<url>http://www.url.gov</url>
<overview>Orange County Overview</overview>
<Cities>
<City name="City #1" size="big" population="33333"/>
<City name="City #2" size="medium" population="2222"/>
<City name="City #3" size="Small" population="111"/>
</Cities>
</County>
</States>
</Country>
对于上面的 XML,“select [cities] where [name]='Orange'”的等效 XPath 表达式是什么?
编辑 07/27/09 上午 00:29 PST:
我知道了!谢谢大家的建议,你们是很棒的老师。我能够从所有“城市”中选择所有属性
/Country/States/County[name='Orange']/Cities/City