# Help With XML With AS3!

**URL:** https://forum.kirupa.com/t/help-with-xml-with-as3/264073
**Category:** Uncategorized
**Created:** [June 22, 2008, 11:48pm UTC](https://forum.kirupa.com/t/help-with-xml-with-as3/264073 "2008-06-22T23:48:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zygos](https://avatars.discourse-cdn.com/v4/letter/z/b782af/32.png) [@zygos](https://forum.kirupa.com/u/zygos)
#### Post date: [June 22, 2008, 11:48pm UTC](https://forum.kirupa.com/t/help-with-xml-with-as3/264073/1 "2008-06-22T23:48:55Z")

</div>

Hi people, as you will guess im new to AS3 so please be forgiving!

Im trying to implement a web based XML file into an AS3 based flash doc. I have no problems grabbing the data from the XML, but getting it to display, well it probably obvious, but it aint happenin for me!!

My current code is as follows…

* * *

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

xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

xmlLoader.load(new URLRequest(“[http://lctinteractive.com/ryancrossland/headlines.xml](http://lctinteractive.com/ryancrossland/headlines.xml)”));

function LoadXML(e:Event):void {  
xmlData = new XML(e.target.data);  
//START DATA TRACE  
trace(“XML Output”);  
trace("------------------------");  
trace(xmlData);  
//END DATA TRACE  
}

* * *

With Thanks,  
Ryan

(If your feeling nice, email me some examples to [ryan\_crossland@mac.com](mailto:ryan_crossland@mac.com) I would appreciate it!)

---

<div class="post-metadata">

### Author: ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)
#### Post date: [June 23, 2008, 3:32am UTC](https://forum.kirupa.com/t/help-with-xml-with-as3/264073/2 "2008-06-23T03:32:31Z")

</div>

I never understand why people expect others to e-mail them on a forum… it makes more sense to post an answer here so others can benefit from it.

Anyway, what you’re possibly after is something like this:

```auto
trace(xmlData.toXMLString());

```

---

<div class="post-metadata">

### Author: ![zygos](https://avatars.discourse-cdn.com/v4/letter/z/b782af/32.png) [@zygos](https://forum.kirupa.com/u/zygos)
#### Post date: [June 23, 2008, 11:48am UTC](https://forum.kirupa.com/t/help-with-xml-with-as3/264073/3 "2008-06-23T11:48:50Z")

</div>

Yeah ill try that, true point about the email ( I did mean a flash file though…dont know if you can send over forums)

Thanks again
