# Load problem... SOS!

**URL:** <https://forum.kirupa.com/t/load-problem-sos/184778>\
**Category:** Uncategorized\
**Created:** [April 7, 2006, 5:56pm UTC](https://forum.kirupa.com/t/load-problem-sos/184778 "2006-04-07T17:56:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [April 7, 2006, 5:56pm UTC](https://forum.kirupa.com/t/load-problem-sos/184778/1 "2006-04-07T17:56:58Z")

</div>

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.

```auto

///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");
 }
}  

```
