【发布时间】:2010-09-13 14:37:39
【问题描述】:
假设我有以下 XML...
<root>
<base>
<tent key="1" color="red"/>
<tent key="2" color="yellow"/>
<tent key="3" color="blue"/>
</base>
<bucket>
<tent key="1"/>
<tent key="3"/>
</bucket>
</root>
...返回“bucket”包含“red”和“blue”的 XPath 是什么?
【问题讨论】:
-
当前接受的答案中的 XPath 表达式根本没有选择任何“桶”节点。它选择“颜色”属性。所以这个答案是错误的。 dacracot,请接受 Jeni 的回答,这是一个很好的回答
标签: xml xslt xpath subtree xslkey