I call this method and result show in alert box correct but not show in xml file...
public function writeFile():void
{
var newXML:XML = <author>Bob</author>;
var f:File = File.documentsDirectory.resolvePath("new_authors.xml");
var fout:FileStream = new FileStream();
fout.open(f, FileMode.WRITE);
var output:String = '<?xml version="1.0" encoding="utf-8"?>\n';
output += newXML.toXMLString();
fout.writeUTFBytes(output);
Alert.show(output);
fout.close();
}
No comments:
Post a Comment