Xml array question

I’m pretty new to actionscript and programming in general. I’ve gone through several of the tutorials on this site, and I’ve gotten this far:

I’m trying to build a dynamic navigation menu that loads from an xml document.
I’ve gotten the button to load from the library per number of nodes, and I’ve gotten a dynamic text field inside the movieclip to load the proper node that gives name to each button, but I can’t get a getURL function to load the corresponding href attribute that would make each button go to the correct page. example:
<name href="http://whateveraddress.net/folder/file.html>home< /name>

I have gotten a function to getURL, but it always picks the last href attribute in the array.


what am I doing wrong?