Cant write XML with this code, why?

 
sub_menu = new Array();
xml_file = "menu.xml";
xmlload = new XML();
xmlload.ignoreWhite = true;
 
xmlload.onLoad = function(ok) {
if (ok) {
count = this.firstChild.childNodes.length;
trace("Total: "+count);
for (var i = 0; i<count; i++) {
curNode = this.firstChild.childNodes*;
sub_menu* = {iText:curNode.childNodes[0].firstChild.nodeValue,iUrl:curNode.childNodes[1].firstChild.nodeValue};
}
trace("In array: "+sub_menu.length);
fnWrite();
} else {
trace("Could not load "+xml_file+".");
}
};
xmlload.load(xml_file);
// ------------------------------------------------------------
fnCreatetf = function(i) {
textY = 20 + i*10;
this.createTextField("sMitem"+i, this.getNextHighestDepth(), 10, textY, 400, 20);
var sMitemNo = "sMitem"+i;
sMitemNo.border = true;
sMitemNo.html = true;
 
}
 
 
fnWrite = function () {
for (var i = 0; i<sub_menu.length; i++) {
fnCreatetf(i);
 
sMitemNo.htmlText = sub_menu*.iText;
//sub_menu.text = sub_menu*.iText;
}
};
 
 
 

This is the code, and on my stage there is a dynamic text field called
sub_menu. But I cant print those stuff :confused:
Also How can I make them clickable ? I mean when I click one of the texts it will load a swf. XML file is here too:

 
 
<sub_menu>
 
<sMenuitem>
<iText>Portfolio</iText>
<iUrl>portfolio.swf</iUrl>
</sMenuitem>
 
<sMenuitem>
<iText>Curriculum Vitae</iText>
<iUrl>cv.swf</iUrl>
</sMenuitem>
 
<sMenuitem>
<iText>Personal</iText>
<iUrl>ps.swf</iUrl>
</sMenuitem>
 
<sMenuitem>
<iText>Photography</iText>
<iUrl>Photo.swf</iUrl>
</sMenuitem>
 
<sMenuitem>
<iText>Contact</iText>
<iUrl>contact.swf</iUrl>
</sMenuitem>
 
</sub_menu>