EDN Admin
Well-known member
Iterating through an xPathNavigator nodeset using Movenext(), is there a way to get the absolute position of each nodeset node without having to traverse back to the root each time?
I am using xNode.Current.Select("./preceeding::*").Count but that traverses back to the root each time. Maybe something like the following[psuedo code]
while(xNode.MoveNext()
{
int pos = xNode.Current.Select(".preceeding::*[node() != lastNode]".Count;
lastNode=xNode;
}
View the full article
I am using xNode.Current.Select("./preceeding::*").Count but that traverses back to the root each time. Maybe something like the following[psuedo code]
while(xNode.MoveNext()
{
int pos = xNode.Current.Select(".preceeding::*[node() != lastNode]".Count;
lastNode=xNode;
}
View the full article