I have the following class which I do a new of

Code:
import XMLthing;
var myXML:XMLthing =new XMLthing("Island/islands.xml",this);
and so it runs and loads the xml file i need. I would like to know (for any style of xml) how pest to parse this into either arrays or an object. I used to use the data source component and this somehow created this easily for me, cant work outhow best. Its the bit in the tree function which i would like to bottle up nice and easy all the data. Later on I will work out a pre loader script.

There is a datasource component on the stage called "ds" which I want to populate.

thanks


Code:
class XMLthing extends XML {
	private var thexml:String;
	private var parent:Object; //ref to calling object so we dont loose scope.
	public function XMLthing(thexml:String,parent:Object) {
		super();
		this.thexml = thexml;
		this.parent=parent;
		this.ignoreWhite=true;
		this.load(thexml);
	}
	public function onLoad(yes:Boolean) {
		if (yes) {
			//trace("loaded");
			this.tree();
		} else {
			trace("not loaded");
		}
	}
	private function tree(){
		//create natives
		//trace("this"+this);
		parent.ds.items=this.childNodes;
		trace(parent.ds.items);
		}
}