首页 > 代码库 > flash的as操作XML

flash的as操作XML

//as3.0var myXML:XML = new XML();  var XML_URL:String = "nav.config"; var myXMLURL:URLRequest = new URLRequest(XML_URL);  var myLoader:URLLoader = new URLLoader(myXMLURL);  myLoader.addEventListener(Event.COMPLETE, xmlLoaded);function xmlLoaded(evtObj:Event) {  myXML = XML(myLoader.data);  //trace (myXML.child(0));  }//as2.0var myXml=new XML();myXml.ignoreWhite=true;myXml.load("nav.config");myXml.onLoad = function(success){ //myTxt.text = myXml.selectNodes("/INVENTORY/BOOK/AUTHOR")[0].text; myTxt.text=myXml.childNodes[0].childNodes[1].firstChild;}myBtn.onPress=function(){ getURL(myTxt.text);}

参考转自:

http://blog.sina.com.cn/s/blog_6aa484980100lt48.html

http://ajxfxb.blog.163.com/blog/static/56675086200991901932755/

flash的as操作XML