# Flash loading xml into text fields

**URL:** <https://forum.kirupa.com/t/flash-loading-xml-into-text-fields/218587>\
**Category:** Uncategorized\
**Created:** [March 9, 2007, 12:52am UTC](https://forum.kirupa.com/t/flash-loading-xml-into-text-fields/218587 "2007-03-09T00:52:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Multi\_Task](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Multi\_Task](https://forum.kirupa.com/u/Multi_Task)\
**Post date:** [March 9, 2007, 12:52am UTC](https://forum.kirupa.com/t/flash-loading-xml-into-text-fields/218587/1 "2007-03-09T00:52:35Z")

</div>

Hey yall trying to get an xml with only text reading into some text fields. I have the following for code:

My AS

```auto

var x:XML = new XML();
x.ignoreWhite = true;
var text1:Array = new Array();
var text2:Array = new Array();
var text3:Array = new Array();
x.onLoad = function() {
 var contentText:Array = this.firstChild.childNodes;
 for(i=0;i<contentText.length;i++) {
  text1.push(contentText*.attributes.textCon1);
  text2.push(contentText*.attributes.textCon2);
  text3.push(contentText*.attributes.textCon3);
 }
 t1.textArea.text = textCon1*;
 t2.textArea.text = textCon2*;
 t3.textArea.text = textCon3*;
}
x.load("words.xml");
 

```

My XML

```auto

<?xml version="1.0" encoding="ISO-8859-1"?>
<phrase>
<contentText>
 <textCon1>"1"</textCon1>
 <textCon2>"2"</textCon2>
 <textCon3>"3"</textCon3>
</contentText>
</phrase>

```

It doesnt seem to be loading correctly any ideas?  
Thanks in advance.  
MT
