# Problems loading XML file

**URL:** <https://forum.kirupa.com/t/problems-loading-xml-file/291141>\
**Category:** flash\
**Created:** [June 25, 2009, 6:02am UTC](https://forum.kirupa.com/t/problems-loading-xml-file/291141 "2009-06-25T06:02:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Catharsis](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@Catharsis](https://forum.kirupa.com/u/Catharsis)\
**Post date:** [June 25, 2009, 6:02am UTC](https://forum.kirupa.com/t/problems-loading-xml-file/291141/1 "2009-06-25T06:02:21Z")

</div>

Hey everyone,

I’m having a problem loading a local xml file into my swf. My ultimate goal is to parse the xml file into a list of guests attending a party. Here is the code I have:

```auto

var loader:URLLoader;

function loadXML():void
{
    loader = new URLLoader(new URLRequest("test1.xml"));
    loader.addEventListener(Event.COMPLETE, doGuests);  
}

function doGuests(e:Event)
{

    var xml:XML = new XML(e.target.data);
    trace("XML:");
    trace(xml); //shows xml file
    var list:XMLList = xml.guests.guest;
    trace("LIST:");
    trace(list); //shows nothing
}

loadXML();

```

As you can see, the first trace statement outputs the xml file with the tags and all. The second trace statement outputs nothing. I did try uploading the xml file to a server, and then using [http://www.catharsiswd.com/test1.xml](http://www.catharsiswd.com/test1.xml) as the URL for the URLRequest, but that didn’t work either. Any insight would be greatly appreciated!
