# XML from external class

**URL:** <https://forum.kirupa.com/t/xml-from-external-class/109532>\
**Category:** Uncategorized\
**Created:** [May 6, 2004, 1:00pm UTC](https://forum.kirupa.com/t/xml-from-external-class/109532 "2004-05-06T13:00:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarah012](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@sarah012](https://forum.kirupa.com/u/sarah012)\
**Post date:** [May 6, 2004, 1:00pm UTC](https://forum.kirupa.com/t/xml-from-external-class/109532/1 "2004-05-06T13:00:33Z")

</div>

I am having some difficulties loading XML from an external class. I would like to place the firstChild into a Dynamic Text Box. In my Flash movie the text box is labeled LevelTitle. This is my code at the moment:

```auto
class SelectTest extends XML {
	var Testlist: XML;
	var curContainer:XMLNode
	
	function SelectTest() {
		var Testlist = new XML;
		Testlist.load("TestList.xml");
		Testlist.ignoreWhite = true;
		Testlist.onLoad = getTest()
		
	}

	function getTest() {
		trace ("success");
		var LevelTitle= Testlist.firstChild
	 	trace (LevelTitle);
	}
}

```

It always traces “sucess” leading me to believe that the xml is loading successfully, but when I try to trace LevelTitle, (or Testlist.firstChild, or Testlist.toString()) I always get undefined. What am I doing wrong?
