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,
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?
___
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
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
-
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
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
: [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
7 matches
Mail list logo