# XML, Looping through an array

**URL:** https://forum.kirupa.com/t/xml-looping-through-an-array/250813
**Category:** flash
**Created:** [February 1, 2008, 7:08pm UTC](https://forum.kirupa.com/t/xml-looping-through-an-array/250813 "2008-02-01T19:08:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pixel\_chick](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@pixel\_chick](https://forum.kirupa.com/u/pixel_chick)
#### Post date: [February 1, 2008, 7:08pm UTC](https://forum.kirupa.com/t/xml-looping-through-an-array/250813/1 "2008-02-01T19:08:42Z")

</div>

I have an XML document that loading into Flash. I have a dynamic text box on the stage that I am writing the XML to. My problem is, I have 6 group names that I am pulling from my XML file and I want to write each one of them to the text box and add a line break to the end. This is my code:

var group= this.firstChild.firstChild.childNodes;  
for (var i=2; i\<group.length; i++){  
divBox[‘divInfoLinks’].htmlText = this.firstChild.firstChild.childNodes\*.attributes.name;  
}

When I trace \* it lists all 6 names, however my text box only shows the last name in the array. Any thoughts?
