Re: [Flashcoders] AIR - Insert header in XML file

2008-04-03 Thread Ian Thomas
Uh... other way around, surely? var myString:String = ?xml delcaration here?; myString+=yourXML.toString(); save(myString, myString.xml); But Steven's right - that's always worked for me, with no need to use xmlDecl. I'd never heard of xmlDecl until Wagner mentioned it... Ian On Thu, Apr 3,

Re: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Steven Sacks
Can't you inject that into your xml string? myXml = ?xml version=1.0 encoding=UTF-8? + myXml; Patrick Matte | BLITZ wrote: I'm saving an xml file with AIR, it works but how can I add ?xml version=1.0 encoding=UTF-8? at the top of the file? ___

Re: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Wagner Amaral
You can set the xmlDecl property: AS3: XMLDocument().xmlDecl = ?xml version=1.0 encoding=utf-8?; AS2: XML().xmlDecl = ?xml version=1.0 encoding=utf-8?; On Wed, Apr 2, 2008 at 7:06 PM, Patrick Matte | BLITZ [EMAIL PROTECTED] wrote: I'm saving an xml file with AIR, it works but how can I add

Re: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Wagner Amaral
Well, if you just use quotes properly, that is ;) '?xml version=1.0 encoding=utf-8?'; On Wed, Apr 2, 2008 at 7:45 PM, Wagner Amaral [EMAIL PROTECTED] wrote: You can set the xmlDecl property: AS3: XMLDocument().xmlDecl = ?xml version=1.0 encoding=utf-8?; AS2: XML().xmlDecl = ?xml

RE: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Patrick Matte | BLITZ
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wagner Amaral Sent: Wednesday, April 02, 2008 3:46 PM To: Flash Coders List Subject: Re: [Flashcoders] AIR - Insert header in XML file Well, if you just use quotes properly, that is ;) '?xml version=1.0 encoding=utf-8?'; On Wed

Re: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Steven Sacks
myString:String = yourXML.toString(); myString += ?xml delcaration here?; save(myString, myString.xml); An XML file is just a text file with a .xml extension. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] AIR - Insert header in XML file

2008-04-02 Thread Patrick Matte | BLITZ
: [Flashcoders] AIR - Insert header in XML file Can't you inject that into your xml string? myXml = ?xml version=1.0 encoding=UTF-8? + myXml; Patrick Matte | BLITZ wrote: I'm saving an xml file with AIR, it works but how can I add ?xml version=1.0 encoding=UTF-8? at the top of the file