# A Final XML Question

**URL:** <https://forum.kirupa.com/t/a-final-xml-question/204184>\
**Category:** flash\
**Created:** [October 17, 2006, 7:39pm UTC](https://forum.kirupa.com/t/a-final-xml-question/204184 "2006-10-17T19:39:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr77](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@dr77](https://forum.kirupa.com/u/dr77)\
**Post date:** [October 17, 2006, 7:39pm UTC](https://forum.kirupa.com/t/a-final-xml-question/204184/1 "2006-10-17T19:39:58Z")

</div>

Thanks to lots of help from people on the forum, I’ve managed to target an XML file from a \_mc on my main timeline.

On my main timeline I have the following:

```auto
var My_XML:XML = new XML(); 
var rootXML1;
My_XML.ignoreWhite = true; 
My_XML.onLoad = function(success:Boolean){ 
   rootXML1 = this.childNodes; 
   trace(this.status); 
   if (success){ 
      trace(this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue);
   _root.question_mc.gotoAndPlay(2);
   gotoAndPlay(3);
   } else { 
      trace("fail"); 
   } 
} 
My_XML.load(_global.fileName); 

```

And in a movie clip I have:

```auto
question_txt.text = _root.rootXML1;

```

It works - but it displays the entire XML file in the question\_txt.text box.

How do I narrow this down to display only one piece of information form my XML file?

In the past, I have used ‘childNodes[0]…’ etc but I can’t seem to get this to work in this instance.

Any help would be gratefully received - you have no idea how long I have laboured over this simple problem!

Thanks for the help so far,

David
