Reputation: 1020
I'm new to XSLT. this may be a simple question,
example : XML
<doc>
<sec id="sec_2" sec-type="norm-refs">
</doc>
I need to know is there any <sec>
node containing attribute sec-type='node-refs'
, exist or not in original XML document.
Upvotes: 0
Views: 121
Reputation:
This is a simple XPath:
//sec[@type="norm-refs"]
The @
symbol indicates that you want an attribute that matches, not an element. The square brackets indicate you want something that matches that but the selector returns what comes before the square brackets.
Upvotes: 1