Accessing Parent Nodes : Parent : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Parent »

 

Accessing Parent Nodes


 


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


        var doc:XML = <grandparent><parent><child></child></parent></grandparent>;
        trace(doc);
        var kid:XML = doc.parent.child[0];
        trace(kid);
        var grandparent:XML = kid.parent().parent(  );
        trace(grandparent);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» Parent