# Problems loading xml data

**URL:** <https://forum.kirupa.com/t/problems-loading-xml-data/259015>\
**Category:** flash\
**Created:** [April 30, 2008, 12:28pm UTC](https://forum.kirupa.com/t/problems-loading-xml-data/259015 "2008-04-30T12:28:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuerschi](https://avatars.discourse-cdn.com/v4/letter/w/e480ec/32.png) [@wuerschi](https://forum.kirupa.com/u/wuerschi)\
**Post date:** [April 30, 2008, 12:28pm UTC](https://forum.kirupa.com/t/problems-loading-xml-data/259015/1 "2008-04-30T12:28:09Z")

</div>

I followed the tutorial “Using XML in Flash CS3/AS3”, to access external xml data.  
Everything works just as expected.

```auto
 
function LoadXML(e:Event):void { 
xmlData = new XML(e.target.data);         
trace(xmlData.Books); //--> works fine
}

```

But if I replace the xml file from the tutorial with a new one I’m not able to trace any elements in the self-written xml file:

```auto
 
function LoadXML(e:Event):void { 
xmlData = new XML(e.target.data);         
trace(xmlData.Table); // --> doesn't work
}

```

It doesn’t give me an error message, just a blank output window  
The interesting thing is that tracing the whole xml-objekt is possible:

```auto
 
function LoadXML(e:Event):void { 
xmlData = new XML(e.target.data);         
trace(xmlData); //--> works also with the replaced xml file
}

```

Thats the xml file:

```auto

<Table>
    <Player>
        <number>1</number>
        <name>Test1</name>
        <chips>1500</chips>
    </Player>
    <Player>
        <number>2</number>
        <name>Test2</name>
        <chips>1500</chips>
    </Player>
    <Player>
        <number>3</number>
        <name>Test3</name>
        <chips>1500</chips>
    </Player>
    <Player>    
        <number>4</number>    
        <name>Test4</name>
        <chips>1500</chips>
    </Player>
</Table>

```

Hopefully anyone finds the problem.

---

<div class="post-metadata">

**Author:** ![wuerschi](https://avatars.discourse-cdn.com/v4/letter/w/e480ec/32.png) [@wuerschi](https://forum.kirupa.com/u/wuerschi)\
**Post date:** [May 19, 2008, 7:28pm UTC](https://forum.kirupa.com/t/problems-loading-xml-data/259015/2 "2008-05-19T19:28:59Z")

</div>

Yeah you are right.  
But how is it possible to store the data from the xml file outside the LoadXML Funtion?  
I have to access it from other frames in the timeline and I can’t imagine how that would work…
