# Listing all nodes from a xml sheet

**URL:** <https://forum.kirupa.com/t/listing-all-nodes-from-a-xml-sheet/163394>\
**Category:** flash\
**Created:** [September 22, 2005, 2:25am UTC](https://forum.kirupa.com/t/listing-all-nodes-from-a-xml-sheet/163394 "2005-09-22T02:25:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![inVZbl](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/invzbl/32/309_2.png) [@inVZbl](https://forum.kirupa.com/u/inVZbl)\
**Post date:** [September 22, 2005, 2:25am UTC](https://forum.kirupa.com/t/listing-all-nodes-from-a-xml-sheet/163394/1 "2005-09-22T02:25:27Z")

</div>

Alo all

Ive got an xml sheet that is 3 levels deep (part example below)

```auto
<flashNav>
   <navItem itemName="1" itemPath="" itemClip="">
          <navItem itemName="1.1" itemPath="" itemClip="">
               <navItem itemName="1.1.1" itemPath="" itemClip=""/>
               <navItem itemName="1.1.2" itemPath="" itemClip=""/>
               <navItem itemName="1.1.3" itemPath="" itemClip=""/>
               <navItem itemName="1.1.4" itemPath="" itemClip=""/>
          </navItem>
          <navItem itemName="1.2" itemPath="" itemClip="">
          <navItem itemName="1.3" itemPath="" itemClip="">
          <navItem itemName="1.4" itemPath="" itemClip="">
               <navItem itemName="1.4.1" itemPath="" itemClip=""/>
          </navItem>
</navItem>
</flashNav> 

```

That i want to read into an array in sequental order.

At the moment i can only get the first level showing up with the following code:

```auto
var menuItems = this.firstChild;
		for (var i = 0; i<menuItems.childNodes.length; i++) {
			menuTitles.push(menuItems.childNodes*.attributes.itemName);
			menuLinks.push(menuItems.childNodes*.attributes.itemPath);
		}
		trace(menuItems.childNodes.length);

```

How would i go about adding the rest of the nodes into the array?
