# Load xml code not working, cant see why

**URL:** <https://forum.kirupa.com/t/load-xml-code-not-working-cant-see-why/245203>\
**Category:** Uncategorized\
**Created:** [November 27, 2007, 1:21pm UTC](https://forum.kirupa.com/t/load-xml-code-not-working-cant-see-why/245203 "2007-11-27T13:21:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjwright](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sjwright](https://forum.kirupa.com/u/sjwright)\
**Post date:** [November 27, 2007, 1:21pm UTC](https://forum.kirupa.com/t/load-xml-code-not-working-cant-see-why/245203/1 "2007-11-27T13:21:06Z")

</div>

Hi there.

Im currently redesigning my website, and I have an xml page populated from a PHP database, and can be seen here:  
[Click here](http://beta.sjwright.co.uk/scripts/xml.php)

I have inserted the following code into my Flash movie and when I test it, the dynamic textbox displays “undefined” instead of the value from the XML document.

The code is as follows:

```auto
System.security.allowDomain("http://beta.sjwright.co.uk/");
function loadXML(loaded) { 
	if (loaded) { 
		_root.mctitle.text = this.firstChild.attributes.TITLE; 
	} else { 
		trace("file not loaded!");
	}
}
xmlData = new XML(); 
xmlData.ignoreWhite = true; 
xmlData.onLoad = loadXML; 
xmlData.load("http://beta.sjwright.co.uk/scripts/xml.php");

```

I cannot see why it doesn’t work, bu it is very frustrating as everything seems to me to be coded correctly.

Any help received would be received with much appreciation.

Thanks  
Stephen
