# Binding my XML file to Flash Using AS3

**URL:** <https://forum.kirupa.com/t/binding-my-xml-file-to-flash-using-as3/296470>\
**Category:** flash\
**Created:** [September 15, 2009, 1:02pm UTC](https://forum.kirupa.com/t/binding-my-xml-file-to-flash-using-as3/296470 "2009-09-15T13:02:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![prone](https://avatars.discourse-cdn.com/v4/letter/p/7c8e57/32.png) [@prone](https://forum.kirupa.com/u/prone)\
**Post date:** [September 15, 2009, 1:02pm UTC](https://forum.kirupa.com/t/binding-my-xml-file-to-flash-using-as3/296470/1 "2009-09-15T13:02:09Z")

</div>

Hello!

I’ve researched a lot of examples on how to do this and I’m almost there. I actually got it to show up in the dynamic text box, but its also displaying my **[COLOR=#ff0000]xml[/COLOR]** and css tags(The **[COLOR=#ff0000]XML[/COLOR]** file structure). I know the **[COLOR=#ff0000]xml[/COLOR]** and css files both work after testing them in my browser. Can you please assist me with fine-tuning this AS3 code. My **[COLOR=#ff0000]XML[/COLOR]** file only has one node. Below is my AS3 code:

```auto

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoadXML);
loader.load(new URLRequest("content.xml"));
function onLoadXML(e:Event):void
{
 var **[COLOR=#ff0000]xml[/COLOR]**:XML = new **[COLOR=#ff0000]XML[/COLOR]**(e.target.data);
 //trace(**[COLOR=#ff0000]xml[/COLOR]**)
 textBox.text = e.target.data
 
}
 

```

I just need it to read the content and follow the css code that’s been attached to it.

Thanks!
