# XML in Flash

**URL:** <https://forum.kirupa.com/t/xml-in-flash/245889>\
**Category:** Uncategorized\
**Created:** [December 5, 2007, 7:40am UTC](https://forum.kirupa.com/t/xml-in-flash/245889 "2007-12-05T07:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sculptor85](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@sculptor85](https://forum.kirupa.com/u/sculptor85)\
**Post date:** [December 5, 2007, 7:40am UTC](https://forum.kirupa.com/t/xml-in-flash/245889/1 "2007-12-05T07:40:17Z")

</div>

hello everyone. Thanks in advance for your help!

I’m trying to get XML working on my FLASH project here. I have to following actionscript working on a plain single layer flash file (AS 2.0).

```auto

var myXML:XML = new XML();
myXML.ignoreWhite=true;
myXML.onLoad = function(success) {
    if(success) {
        semTXT = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
        semBox.text = semTXT;
    }
}
myXML.load("test.xml"); 

```

and I have the following XML format:

```auto

<?xml>
<messages>
    <message>
        <region>Place 1</region>
        <sem>Person 1</sem>
        <location>Place 2</location>
        <se>Person 2</se>
    </message>
</messages>

```

However, I’m getting a message “undefined” when I test the file. Can anyone let me know if I’m doing something wrong? The actionscript is on the
