3
我的XML:如何使用XPath引用XML属性?
<root>
<cars>
<makes>
<honda year="1995">
<model />
<!-- ... -->
</honda>
<honda year="2000">
<!-- ... -->
</honda>
</makes>
</cars>
</root>
我需要的XPath,将让我的所有模型<honda>
与1995年的
这样:
/root/cars/makes/honda
但如何引用属性?
您的XML不露面 – 2009-10-07 01:27:39
@Rubens法里亚斯:固定。 – Tomalak 2009-10-07 09:21:00