Use for loop to go through the xml data : Loop through : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Loop through »

 

Use for loop to go through the xml data


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var order:XML = <ORDER>
          <ITEM SKU="374">
            <NAME>Toy</NAME>
            <PRICE>39.99</PRICE>
            <QUANTITY>2</QUANTITY>
          </ITEM>
        </ORDER>
        
        for (var childName:String in order.*) {
          trace(childName);
        }

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo XML
» Loop through