# XML listing problem

**URL:** https://forum.kirupa.com/t/xml-listing-problem/270821
**Category:** flash
**Created:** [September 14, 2008, 11:57pm UTC](https://forum.kirupa.com/t/xml-listing-problem/270821 "2008-09-14T23:57:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![monsterchild](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@monsterchild](https://forum.kirupa.com/u/monsterchild)
#### Post date: [September 14, 2008, 11:57pm UTC](https://forum.kirupa.com/t/xml-listing-problem/270821/1 "2008-09-14T23:57:46Z")

</div>

hi all, i know how to solve this problem using AS2 but am trying out AS3 as it seems a lot better…

here’s the code i’m using:

```auto
var textLoader:URLLoader = new URLLoader();
var textRequest:URLRequest = new URLRequest("list.xml");

textLoader.load(textRequest);
textLoader.addEventListener(Event.COMPLETE,fileLoaded);

var xml:XML;

function fileLoaded(e:Event):void {
	xml = new XML(e.target.data);
	var il:XMLList = xml.person;
	for (var i:uint=0; i<il.length(); i++){
	text_field.text = il.text()*+"
";
        //trace(il.text()*+"
");
	}
	text_field.wordWrap = true;
}

```

ok, it all works fine in the trace output window but in the dynamic text box, it just shows the last XML entry where i need it to show the complete list  
so i’m guessing it is just overwriting each entry instead of registering the line break but i can’t figure out why…

the XML code is like this

```auto
<list>
<person>lastname1,firstname1 - phonenumber</person>
<person>lastname2,firstname2 - phonenumber</person>
<person>lastname3,firstname3 - phonenumber</person> 
</list>

```

can someone please help me out with this?
