package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var movieList:XML =
My favorite movies
Titus
1999
J T
Rushmore
1998
W A
Hall
1977
Woody Allen
;
movieList.movie[1].attribute("id"); // 456
movieList.movie[2].attributes(); // 789
//The preceding code is functionally identical to the following code:
movieList.movie[1].@id; // 456
movieList.movie[2].@*; // 789
}
}
}