OK, thank you! Kind regards Cor
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Muzak Sent: zaterdag 4 juli 2009 0:19 To: Flash Coders List Subject: Re: [Flashcoders] Strange characters added to file whensaving fromFlex/AIR using fileStream You mean writing to disk? That's AIR only. regards, Muzak ----- Original Message ----- From: "Cor" <[email protected]> To: "'Flash Coders List'" <[email protected]> Sent: Friday, July 03, 2009 3:21 PM Subject: RE: [Flashcoders] Strange characters added to file whensaving fromFlex/AIR using fileStream > Muzak, > > Is this also possible from Flash?? > And if so: How? > > Kind regards > Cor > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Muzak > Sent: vrijdag 3 juli 2009 14:48 > To: Flash Coders List > Subject: Re: [Flashcoders] Strange characters added to file when saving > fromFlex/AIR using fileStream > > Use FileStream.writeUTFBytes() > > var xml:XML = <order> > <!--This is a comment. --> > <?PROC_INSTR sample ?> > <item id='1'> > <menuName>burger</menuName> > <price>3.95</price> > </item> > <item id='2'> > <menuName>fries</menuName> > <price>1.45</price> > </item> > </order>; > > var str:String = '<?xml version="1.0" encoding="UTF-8?>' + File.lineEnding; > str += xml.toXMLString(); > > var fs:FileStream = new FileStream(); > fs.open(outputFile, FileMode.WRITE); > fs.writeUTFBytes(str); > fs.close(); > > regards, > Muzak > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

