Reputation: 169
I have like
<Father>
<child1/>
<child2/>
<child3/>
<child4/>
</Father>
I am at <child1>
node.(or in any other child node.) now I need to count the number of childs Father has. How to do this?
Upvotes: 0
Views: 1425
Reputation: 167506
Does count(../*)
help? It counts the child elements of the parent of the context node.
Upvotes: 4