# My xml loader class dont work :(

**URL:** <https://forum.kirupa.com/t/my-xml-loader-class-dont-work/216733>\
**Category:** Uncategorized\
**Created:** [February 20, 2007, 4:51am UTC](https://forum.kirupa.com/t/my-xml-loader-class-dont-work/216733 "2007-02-20T04:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![reyco1\_com](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/reyco1_com/32/2169_2.png) [@reyco1\_com](https://forum.kirupa.com/u/reyco1_com)\
**Post date:** [February 20, 2007, 4:51am UTC](https://forum.kirupa.com/t/my-xml-loader-class-dont-work/216733/1 "2007-02-20T04:51:09Z")

</div>

Im trying to set up a class which will load xml and return data I can later parse with a parser class.

When I run the getRawData function from the fla, I get [type function]. any ideas?

```auto

class XMLloader {
    
    public var rawData:String;
    public var setTimeout:Function;
    private var _filePath:String;
    private var myXML:XML;
    
    function XMLloader(filePath:String) {
        this._filePath = filePath;
        this.myXML = new XML();
        init();
    }
    
    private function init() {
        myXML.ignoreWhite = true;
        myXML.onLoad = function() {
            rawData = this;
        };
        myXML.load(_filePath);
    }
    
    public function getRawData(){
        return rawData;
    }
    
    private function toString():String{
        return ("[XMLloader]")
    }
    
}

```

from the fla

```auto

import XMLloader

var myXML:XMLloader = new XMLloader("test.xml");

trace(myXML.getRawData)

```
