# XML - how to find out node position?

**URL:** <https://forum.kirupa.com/t/xml-how-to-find-out-node-position/13666>\
**Category:** programming\
**Created:** [February 16, 2003, 4:23pm UTC](https://forum.kirupa.com/t/xml-how-to-find-out-node-position/13666 "2003-02-16T16:23:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markP](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@markP](https://forum.kirupa.com/u/markP)\
**Post date:** [February 16, 2003, 4:23pm UTC](https://forum.kirupa.com/t/xml-how-to-find-out-node-position/13666/1 "2003-02-16T16:23:40Z")

</div>

Without some kind of ID or numberTag attribute, how can I get the position of which slide I’m looking at? I know with “length” I can see that there 8 slide nodes. How can I find out which one is currently being displayed without making some kind of slide counter that increments by one if you go in order. In other words I want to display a list of images so they can click on any one and have a counter displayed for them that says something like “viewing slide #5 of 8”. Is there a way to do this?

Thanks!

```php

<Slides>
	<slide>Slide 1 Here</slide>
	<slide>Slide 2 Here</slide>
	<slide>Slide 3 Here</slide>
	<slide>Slide 4 Here</slide>
	<slide>Slide 5 Here</slide>
	<slide>Slide 6 Here</slide>
	<slide>Slide 7 Here</slide>
	<slide>Slide 8 Here</slide>
</Slides>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 17, 2003, 1:27pm UTC](https://forum.kirupa.com/t/xml-how-to-find-out-node-position/13666/2 "2003-02-17T13:27:49Z")

</div>

nodes are stored as an array. Its just a matter of using the array index as a counter

if you’re new to XML in flash, scan through the pages of [http://www.kirupaforum.com/showthread.php?s=&threadid=13697](http://www.kirupaforum.com/showthread.php?s=&threadid=13697) which breifly goes over XML in Flash

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 18, 2003, 3:30pm UTC](https://forum.kirupa.com/t/xml-how-to-find-out-node-position/13666/3 "2003-02-18T15:30:11Z")

</div>

It’s not so much the XML I’m having problems with as it is the ActionScript. So any help would be great.

Thanks
