# Getting XML content inside a class

**URL:** <https://forum.kirupa.com/t/getting-xml-content-inside-a-class/168576>\
**Category:** flash\
**Created:** [November 8, 2005, 1:32pm UTC](https://forum.kirupa.com/t/getting-xml-content-inside-a-class/168576 "2005-11-08T13:32:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balala](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Balala](https://forum.kirupa.com/u/Balala)\
**Post date:** [November 8, 2005, 1:32pm UTC](https://forum.kirupa.com/t/getting-xml-content-inside-a-class/168576/1 "2005-11-08T13:32:47Z")

</div>

Take a look at these example:

```auto
	function loadMap():Void {
		var	xdata:XML = new XML();
			xdata.ignoreWhite = true;
			xdata.load(this.source_map);
		
		var var_temp:String;
		
		xdata.onLoad = function(success:Boolean) {
			if(success) {
				var_temp = xdata.firstChild;
			} else {
				trace("Cannot load xml file = " + this.source_map);
			}
		}
	}

```

Now, im creating a local variable **var var\_temp:String;** cause, there is no way that i can pass the values, inside the onLoad handler to a property of the class.

If i try some _ **this.some\_var** _ its reference to escope inside the onLoad handler… ☹

Any solution to get the values to a class property?
