This is becoming a f… nightmare…
So if anyone could help me, i would appreciate.
I am using the following code to “load” info from a xml file to a list component.
For some reason i am NOT able to count or read the NODES (the lines with *).
Can anyone help me pls, b4 i commit suicide ? :hr:
Thanks.
leo.
///Create a new empty XML Object
var foodlist_xml = new XML();
///load in the xml file
foodlist_xml.load("c:\\sorted_by_food.xml");
whether or not XML file has loaded
audiolist_xml.onLoad = function(success)
{
if (success)
{
foodA = new Array();
foodB = new Array();
foodC = new Array();
foodD = new Array();
foodD = new Array();
foodD = new Array();
foodE = new Array();
* eachfood = new Array();
* eachfood = this.firstChild.childNodes;
totalfood = eachfood.length;
trace(totalfood); << this is showing ZERO!
var i=0;
while ( i < totalfood)
{
foodA.push(eachTrack*.attributes.country);
foodB.push(eachTrack*.attributes.band);
foodC.push(eachTrack*.attributes.song);
foodD.push(eachTrack*.attributes.mtype);
foodE.push(eachTrack*.attributes.lang);
list.addItem(i+" | "+ foodA* +" | "+ foodB* +" | "+ foodC* +" | "+ foodD* +" | "+ foodE* +" |");
i = i + 1
}
}
else
{
trace("DIDNT work");
}
}