XML Script logo
Counting elements with sub-content stipulation
Code
<_data ><Outer ><Test foo="lyellow" /><Inner colour="yellow" /><Inner colour="red" foo="bazr" /><Inner colour="red" /><Inner colour="lyellow" >jijo</Inner></Outer></_data>
There are # count(Outer\Inner{.colour == "red"}) # red elements
Output
There are 2 red elements
Ref

x.1302

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited