# XML loop to read values of childNodes

**URL:** <https://forum.kirupa.com/t/xml-loop-to-read-values-of-childnodes/193145>\
**Category:** flash\
**Created:** [July 4, 2006, 6:33pm UTC](https://forum.kirupa.com/t/xml-loop-to-read-values-of-childnodes/193145 "2006-07-04T18:33:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaughtyPine](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@NaughtyPine](https://forum.kirupa.com/u/NaughtyPine)\
**Post date:** [July 4, 2006, 6:33pm UTC](https://forum.kirupa.com/t/xml-loop-to-read-values-of-childnodes/193145/1 "2006-07-04T18:33:50Z")

</div>

Ok i need to have a loop run and load the value (attributes) of each ChildNode.

```auto

<?xml version="1.0" encoding="iso-8859-1"?>
<links>
    <link name="one" ref="one.cfm"/>
    <link name="two" ref="two.cfm"/>
    <link name="three" ref="three.cfm"/>
    <link name="four" ref="four.cfm"/>
</links>

```

My current code will gereate the result of:  
_oneoneoneone_  
but i need  
_onetwothreefour_

```auto

for (k=0; k<numTabs; k++) {
        var allText = rootNode.firstChild.attributes.name;
        trace(allText);
        }

```

What can I do?
