1
我试图从imdb获取数据到as3。我试过如下:从imdb获取数据
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, urlCompleteHandler);
urlLoader.load(new URLRequest("http://www.imdbapi.com/?t=The+Green+Mile "));
private function urlCompleteHandler(e:Event):void {
var resultXML:XML = new XML(e.target.data);
trace(resultXML);
}
现在,如果我跟踪resultXML我得到:
{"Title":"The Green Mile","Year":"1999","Rated":"R","Released":"10 Dec 1999","Genre":"Crime, Drama, Fantasy, Mystery","Director":"Frank Darabont","Writer":"Stephen King, Frank Darabont","Actors":"Tom Hanks, Michael Clarke Duncan, David Morse, Bonnie Hunt","Plot":"The story about the lives of guards on death row leading up to the execution of black man accused of child murder & rape, who has the power of faith healing.","Poster":"http://ia.media-imdb.com/images/M/MV5BMTUxMzQyNjA5MF5BMl5BanBnXkFtZTYwOTU2NTY3._V1._SX320.jpg","Runtime":"3 hrs 9 mins","Rating":"8.4","Votes":"214654","ID":"tt0120689","Response":"True"}
现在我试图从这个结果得到了“等级”,但我不知道如何得到它。
我试过了:resultXML.Rating
但这不会返回任何结果。
任何knw如何我可以得到评级?