Subject:Counting Elements Author:Dhivya J Date:01 Feb 2009 07:34 AM
Hi,
Below is my XML :
<ex>
<a>
<b>
<b>
</a>
<a>
<b>
</a>
<a></a>
</ex>
I need to count the number of <a> tas with atleast one sub element b tag.
i.e) for the above xml i should be getting the count as 2(Though I have 3 <a> tags in the XML the third <a> does not have b in it)
I tried the below function :
Count(\ex\a\b[some conditions for b tags attribute])--->but this gives me the number of b tags and not the count of a tags with atleast one btag