快速上手例:
例1.读xml
- var testXML:XML;
- var file:File = File.documentsDirectory.resolvePath("Mousebomb/test.xml");
- var fileStream:FileStream = new FileStream();
- fileStream.open(file, FileMode.READ);
- testXML = XML(fileStream.readUTFBytes(fileStream.bytesAvailable));
- fileStream.close();
例中使用readUTFBytes()方法读取内容并转换为XML对象。
[ 阅读全文 ]