Looping through nested XML

I got xml file more or less like below

 
<buttons>
 
 <button>
  <buttontext>Hello World</buttontext>
  <particles>
   <mindups>2</mindups>
   <maxdups>4</maxdups>
   <objcolor>[0xFF0000,0x00FF00]</objcolor>
   <mindur>12</mindur>
   <maxdur>36</maxdur>
  </particles>
 </button>
 
 <button>
  <buttontext>WHATS UP</buttontext>
 </button>
 
</buttons>

Some nodes do have the subnode, some don’t. All the nodes have one or more subnodes (it varies per button), the above is just an example that one buttons has a few defined (used to override default settings of a particle component)

I have so far read in all data and works fine, finally getting to the point of having to loop through the subnodes and process those which have been defined in each button… and now I have (simplified to bare)

 
  public var myBUT:XMLList;
 
myBUT = myXML.button;
var nr:uint = myBUT.length()
for(var j:uint = 0;j<nr;j++){
    if(String(myBUT[j].particles).length>0){
     set_particles(j)
    }
}
  function set_particles(j){
   var L:XMLList = myBUT[j].particles;
   for each (var n:XML in L) {
    trace(n)
   }
  }
 

where I had expected it to trace out 5 x (the subnodes) but it traces out 1x the whole node

 
<particles>
  <mindups>2</mindups>
  <maxdups>4</maxdups>
  <objcolor>[0xFF0000,0x00FF00]</objcolor>
  <mindur>12</mindur>
  <maxdur>36</maxdur>
</particles>
 

I’ve been staring at it for a bit now but got blanco … anybody see where I went off track??

P