# Kirupa Tut - Displaying XML data in flash not working

**URL:** <https://forum.kirupa.com/t/kirupa-tut-displaying-xml-data-in-flash-not-working/285913>\
**Category:** flash\
**Created:** [April 7, 2009, 7:31pm UTC](https://forum.kirupa.com/t/kirupa-tut-displaying-xml-data-in-flash-not-working/285913 "2009-04-07T19:31:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Solidus](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Solidus](https://forum.kirupa.com/u/Solidus)\
**Post date:** [April 7, 2009, 7:31pm UTC](https://forum.kirupa.com/t/kirupa-tut-displaying-xml-data-in-flash-not-working/285913/1 "2009-04-07T19:31:05Z")

</div>

Hey everyone,  
I am trying to get a handle on XML and as such I am going through Kirupas tut on displaying XML.  
Unfortunately I cant even get past the first page without something going wrong.

I have saved my inventors.xml and the test page all in the same directory.

The inventors.xml looks like this:

```auto
<?xml version="1.0"?>

<inventors>
    <person>
        <name>Thomas Edison</name>
        <comment>Inventor of many things such as the incandescent lightbulb.</comment>
    </person>
    <person>
        <name>Doug Engelbart</name>
        <comment>Invented the mouse at the Stanford Research Institute</comment>
    </person>
</inventors>

```

The actionscript looks like this:

```auto

function loadXML(loaded) {

if (loaded) {

_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
  trace("file not loaded!");

}

}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");

```

Everything is named perfectly but no matter what I try I keep getting undefined for the dynamic text:

![](http://forum.kirupa.com/uploads/kirupa/5334/e2c233af06c5d86e.jpg)

What am I doing wrong?
