not exactly sure of how to fix this, but i can point you in the right direction.
the advantage of using XML in flex is the ease of formatting. there's no need to use for loops to iterate through every XML node -- this is a very inefficient way of working with XML and it is a waste of using e4x formatting. if you want to access a specific node in the XML structure, become familiar with the syntax for elements, attributes, and descendants (" . ", " .@ ", " .. ").