I am writing a class in Main.as that makes a urlRequest and returns the result. There are 3 nodes I need, minTemp, maxTemp and Icon. I m making the request for one city so there should be just one occurrence of these nodes. How would I structure the AS3 to grab these nodes and their values?
public class Main extends MovieClip {
public function Main() {
var urlRequest:URLRequest=new URLRequest("http://myurl");
var urlLoader:URLLoader=new URLLoader();
var result:XmlDocument=new XMLDocument();
urlLoader.addEventListener(Event.COMPLETE, parseXML);
urlLoader.load(urlRequest);
result.ignorWhite=true;
result.parseXML(getXMLString());
}
}
I m 错误 发现1046种XmlDocument型号,1120种未定义的财产区划XML,1180种要求采用可能未界定的方法进行XMLString。 我也怎么说?