set XML value
♥0 |
Line 15 |
Modified 2009-06-11 06:08:45 |
MIT License
archived:2017-03-20 01:07:47
ActionScript3 source code
/**
* Copyright bigfish ( http://wonderfl.net/user/bigfish )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/zkmp
*/
package {
import flash.display.Sprite;
import flash.text.TextField;
public class FlashTest extends Sprite {
public function FlashTest() {
var myXML:XML = <foo><bar></bar></foo>;
//myXML = "qux" will cause error
//setting a query path works....
myXML.bar = "qux";
//or:
var goo:XMLList = myXML.bar;
goo[0] = "qux";
var tf:TextField = new TextField;
tf.text = myXML.toXMLString();
addChild(tf)
}
}
}