# Make xml imported in loader class global

**URL:** <https://forum.kirupa.com/t/make-xml-imported-in-loader-class-global/294226>\
**Category:** flash\
**Created:** [August 11, 2009, 7:09am UTC](https://forum.kirupa.com/t/make-xml-imported-in-loader-class-global/294226 "2009-08-11T07:09:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phastings](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@phastings](https://forum.kirupa.com/u/phastings)\
**Post date:** [August 11, 2009, 7:09am UTC](https://forum.kirupa.com/t/make-xml-imported-in-loader-class-global/294226/1 "2009-08-11T07:09:06Z")

</div>

Hi,  
I tried to search for this but the search wasn’t working. I have a loder class where i load in some xml. This is the function that’s called after the xml is loaded:

```
public function loadedXML(e:Event):void {
        var xml:XML =new XML(e.target.data);
        trace(xml);
        stage.getChildAt(0).gotoAndPlay('begin');
    }

```

The xml traces out fine. My question is how do I define var xml so that I can access it from outside of the class in another class or from the timeline?
