Dynamic textbox > setting text > XML value

Why won’t this work?

var galleries = this.firstChild.childNodes;
for(var i=0;i<galleries.length;i++) {
	var gallery = galleries*;
	trace(gallery.attributes.name);
	duplicateMovieClip(_root.btn_dummy,"btn_" + i,i);
	_root["btn_" + i]._x = 50;
	_root["btn_" + i]._y = 50 + i*22;
	_root["btn_" + i].btnText.text = gallery.attributes.name;
	trace("++++ " + _root["btn_" + i].btnText.text);
}

So I duplicate a button I made on the root called btn_dummy and the duplication works just fine but only the text doesn’t show.
My first trace shows my XML child nodes, but the second trace just shows “++++ undefined”.

Isn’t this the right way to do it?
root["btn" + i].btnText.text = gallery.attributes.name;

Any one?

Thanks!