XML integration help needed

I’m pretty new to using XML and can get it to work as long as the actionscript is inside the graphic/movie clip or whatever the actual dynamic text is in. The problem is I need to put the actionscript outside of those because some of the work I’m doing it animating the text that is being dynamically changed. It won’t work sometimes unless its not animated or inside too many movie clips.

Is there a way to tell the xml data to look inside the graphic or set of movies to find the “instance” I’m looking for (txt) ?? So I can put the action outside of the movie clip?

My actionscript looks like this.

//

function loadXML(loaded) {

if (loaded) {

_root.the_menu = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.button = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.button2 = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
_root.button3 = this.firstChild.childNodes[0].childNodes[3].firstChild.nodeValue;
_root.button4 = this.firstChild.childNodes[0].childNodes[4].firstChild.nodeValue;

title_01.text = _root.the_menu;
sub_01.text = _root.button;
sub_02.text = _root.button2;
sub_03.text = _root.button3;
sub_04.text = _root.button4;

} else {
  trace("file not loaded!");

}

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

//