Hi frnds,
I am working on a task where I have to convert the Flex application to HTML5.
I am stuck at the very first step where the Flex application is provided a Base64 encoded string and application converts it to xml. (The Base64 encoded string is XML)
Following is the code used in Flex
Base64.toXML(unescape("eNrtXMmS28gRvfsraniyDyXWvky0egKrRhGa8XissA8TEx1YCmpYJNEGQG0n/4b/wt/gT"));
This is the function in Flex used to convert Base64 encoded string to XML.
toXML(input:String, uncompress:Boolean = true):XML
{
var xml:XML;
var arr:ByteArray = Base64.decode(input);
if(uncompress) arr.uncompress();
arr.position = 0;
xml = new XML(arr.readUTFBytes(arr.length))
return xml;
}
I could find the base64Decode function in JQuery but how should I convert the decoded string to XML. I have been searching all over the net but could not find anything.
Any help is appreciated.