0

i want to read an xml file in flash that is returned from a php script. i have it all sorted apart from one thing

the attributes that are returned in each row vary (anything from 1 to 100).

below is the code to explain what i mean

for(var ii:int = 0; ii < tempXML.record.length(); ii++)
{
  for(var b:int = 0; b < numAttributes; b++)
  {
     //what i am aiming for here is the ability to have @"arr"+ a number here
     trace(tempXML.record[ii].@arr+numAttributes);
  }         
}

hopfully you can see what i am getting at. any help apprechiated Cheers Mark

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
markblue777
  • 829
  • 3
  • 13
  • 28

1 Answers1

1

i managed to get it working discovered attributes() and that sorted it so the below worked well for my needs

for(var ii:int = 0; ii < tempXML.record.length(); ii++)
{
   for(var b:int = 0; b < numRows; b++)
   {
      trace(tempXML.record[ii].attributes()[b].name());
   }            
}

Regards Mark

markblue777
  • 829
  • 3
  • 13
  • 28