XML + getUrl always goes to last node

Hi everyone,
I’m trying to load a url from an xml file and place that url on a button. It’s driving me insane.
Here’s my code

myXML = new XML()
myXML.ignoreWhite = true
myXML.ref = this 
myXML.onLoad = function(succes){

var root = this.childNodes[0];
nodes = root.childNodes;
var headlineFinal ="";

for(var j=0; j<nodes.length; j++) {  
duplicateMovieClip (shop_nav, "shop_nav" +j, j-9999);

for(var i=0; i<nodes.length; i++) {  
var prev_pos = getProperty("shop_nav"+i, _y)+(22*(i+1));
setProperty("shop_nav" + i, _y, prev_pos);
setProperty("shop_nav" + i, _alpha, 100);

_root.shop_subnav["shop_nav"+i].onRollOver = function() {this.gotoAndPlay("over");}
_root.shop_subnav["shop_nav"+i].onRollOut = function() {this.gotoAndPlay("out");}
_root.headline = this.childNodes[0].childNodes*.childNodes[0].firstChild.nodeValue.toUpperCase();
headlineFinal += _root.headline+"<br>";

_root.link = this.childNodes[0].childNodes*.childNodes[1].firstChild.nodeValue;

_root.shop_subnav["shop_nav"+i].onRelease = function() {getURL(_root.link);};

shop_textbox_mc.shop_textbox.htmlText = headlineFinal;

else {
trace("Could not load XML file");

my trace values are correct, it’s giving me the right URL but once applied in the getUrl function, it’s ALWAYS going to the last node in my XML file.
If I use something like the following it works but I can’t have HTML… ugh, please help!

"<a href='"+_root.link+"'>"+_root.headline+"</a><br>";