P
parksch2
I've spent quite a bit of time (way more than I'd like) today looking
for an answer to what I thought would be a simple question. I simply
need to get the count of items within some nodes up to the current node
(previous or previous-sibling related). For example, here is some
sample XML I have to work with:
<ITEM>
<CHILD>
<ITEM>
<CHILD />
<CHILD />
</ITEM>
<ITEM>
<CHILD />
<CHILD />
<CHILD />
</ITEM>
<ITEM>
<CHILD /> <<-- current node
</ITEM>
<ITEM>
<CHILD />
</ITEM>
</CHILD>
</ITEM>
Let's say the current node is as noted above. How do I get the count of
the previous CHILD nodes? In this case the number I'm looking for is 5.
Any help would be greatly appreciated!
for an answer to what I thought would be a simple question. I simply
need to get the count of items within some nodes up to the current node
(previous or previous-sibling related). For example, here is some
sample XML I have to work with:
<ITEM>
<CHILD>
<ITEM>
<CHILD />
<CHILD />
</ITEM>
<ITEM>
<CHILD />
<CHILD />
<CHILD />
</ITEM>
<ITEM>
<CHILD /> <<-- current node
</ITEM>
<ITEM>
<CHILD />
</ITEM>
</CHILD>
</ITEM>
Let's say the current node is as noted above. How do I get the count of
the previous CHILD nodes? In this case the number I'm looking for is 5.
Any help would be greatly appreciated!