Accessing Parent Nodes: parent( ) method can be used successively to access any ancestor node
package{
import flash.display.Sprite;
publicclass 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);
}
}
}