# Xml and text fields

**URL:** <https://forum.kirupa.com/t/xml-and-text-fields/276070>\
**Category:** Uncategorized\
**Created:** [November 21, 2008, 11:28pm UTC](https://forum.kirupa.com/t/xml-and-text-fields/276070 "2008-11-21T23:28:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roll4dasoul](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@roll4dasoul](https://forum.kirupa.com/u/roll4dasoul)\
**Post date:** [November 21, 2008, 11:28pm UTC](https://forum.kirupa.com/t/xml-and-text-fields/276070/1 "2008-11-21T23:28:33Z")

</div>

I know this is probably very simple and i’m just being an idiot…acutally i know it’s simple but can’t get it to work.

My problem is that I’m loading an xml file into a text field which works fine. But When I call out each node of the file it just loads the last one…i ran a trace and everything is displayed in a list…but again jsut the last one in the text field on the stage.

var xmlLoader:URLLoader = new URLLoader ();  
var xmlData:XML = new XML ();

xmlLoader.addEventListener (Event.COMPLETE, LoadXML);  
xmlLoader.load(new URLRequest(“xml file”));

function LoadXML(evt:Event):void {  
xmlData = new XML(evt.target.data);  
Parsevideos(xmlData);  
}

function Parsevideos (videoInput:XML):void{  
var videoList:XMLList = videoInput.children();  
for each (var videosElement:XML in videoList){  
textArea.text = videosElement;  
trace(videosElement);}  
}

This is the code i’m using…i call out a child text field but that shouldn’t be the problem. I tried searching for the last few days for a solution but everyone uses a different method…should i go about this another way or amend this code to solve the problem.

Any help would be great,

Thanks,  
Chris
