This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > February 2005 > Re: return position of node using XML DOM (position () ?? in XML





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: return position of node using XML DOM (position () ?? in XML
Martin Honnen

2005-02-25, 6:36 pm



Philip wrote:


> but if passing using the XML DOM in JavaScript - how can we get the position
> of a node selected using an XPATH query?


If you use selectNodes then you get a NodeList to which you can loop and
then the loop variable gives you the position in the NodeList (index
starts with 0 whereas XPath position starts with 1).
A node itself taken out of context doesn't have a position itself.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews