xml - XSLT - check attribute is exist or not -
i'm new xslt. may simple question,
example : xml
<doc> <sec id="sec_2" sec-type="norm-refs"> </doc>
i need know there <sec>
node containing attribute sec-type='node-refs'
, exist or not in original xml document.
this simple xpath:
//sec[@type="norm-refs"]
the @
symbol indicates want attribute matches, not element. square brackets indicate want matches selector returns comes before square brackets.
Comments
Post a Comment