The double-dot operator works for any level of nesting : Double dot « XML « Flash / Flex / ActionScript






The double-dot operator works for any level of nesting

 


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

        var author:XML = <author><name><firstName>Darron</firstName></name></author>;
        
        trace( author..firstName );
  

    }
  }
}

        








Related examples in the same category

1.Use the length( ) method to count the number of elements found: trace( items.item.length( ) );
2.Using the Descendant Accessor (..) to make a deep dive to the data without worrying about the path.
3.pull all of the attributes from the entire XML document