0
在選擇特定項目,請考慮以下XMLXML集合
<account>
<discussionPoints>
<education category="a" value="1"/>
<education category="b" value="42"/>
<education category="c" value="55"/>
</discussionPoints>
</account>
我試圖讓教育在類別是「a」的值的值。特定的教育可能存在也可能不存在。 DiscussionPoints集合將永遠存在,儘管它可能是空的。我是XSLT新手,需要一些指導。
EDIT修正不正確的結束標記
使用以下XPath表達式:'/ account/discussionPoints/education [@ category ='a']/@ value' – toniedzwiedz 2012-07-26 19:51:08
就是這樣!如果您不介意,請作出回答,以便我可以選擇它作爲正確答案。 – 2012-07-26 19:59:37