You need to Base64 encode the binary data. Once encoded, it is treated
as a text string, and can be embedded within an xml document. You also
need to keep in mind that Base64 encoding data also increases the size
of the data. When you are retrieving data out of the xml, you will need
to decode the base64-encoded data back into its binary form.
private function base64Encode( data : ByteArray ) : String
{
var encoder : Base64Encoder = new Base64Encoder();
encoder.encodeBytes( data );
return encoder.flush();
}
Hope that helps,
-Andy
_____________________________________
Andrew Trice
Cynergy Systems, Inc.
http://www.cynergysystems.com
Blog: http://www.cynergysystems.com/blogs/page/andrewtrice
Email: [EMAIL PROTECTED]
Office: 866-CYNERGY
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of wifi19
Sent: Tuesday, January 30, 2007 5:22 AM
To: [email protected]
Subject: [flexcoders] Init image with binary xml node
Hie !
i'm searching how can i create a image with a binary node in my xml file
<image> binary file </image>
can you help me ?
Thanks !