Here is some sample XML:
<?xml version="1.0"?>
<Data>
<LineItems>
<LineItem>
<A>1</A>
<B>2</B>
</LineItem>
<LineItem>
<A>3</A>
<B>4</B>
<C>5</C>
<Z>X</Z>
</LineItem>
</LineItems>
</Data>
I'm have a template to match "LineItems" and in it am doing a for-each loop on "LineItem". My problem is this. If a LineItem node has a child of Z I need to know the count of that LineItem child nodes, excluding Z (In the above example the answer would be 3).
Can anyone assist me in creating this expression? Thanks in advance.
<?xml version="1.0"?>
<Data>
<LineItems>
<LineItem>
<A>1</A>
<B>2</B>
</LineItem>
<LineItem>
<A>3</A>
<B>4</B>
<C>5</C>
<Z>X</Z>
</LineItem>
</LineItems>
</Data>
I'm have a template to match "LineItems" and in it am doing a for-each loop on "LineItem". My problem is this. If a LineItem node has a child of Z I need to know the count of that LineItem child nodes, excluding Z (In the above example the answer would be 3).
Can anyone assist me in creating this expression? Thanks in advance.