Hi
I have an XML which is sent to Flash. In Flash I want to use it as an XML-Object.
So far so good.
The XML is however sent to flash as a String of hexadecimal values (as if you’d open the xml in a hex-editor). So the variable I receive in Flash looks like this:
“3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c…” and so on and so on.
Any Ideas how I can convert this hex-string back to a useable XML-object?
So far I have tried to cast the string to a byteArray, and then read it, but no luck with that (inFile is the string):
public function bitesArray(inFile)
{
trace("String = "+inFile); // traces out fine
trace("Type of imput-data is "+getQualifiedClassName(inFile));// "String"
trace("try interpreting as bitesArray");
var stream = ByteArray(inFile);
var testText = stream.readUTF();
trace("Stream-decoding = "+testText); // no output for "testText"
var castXmlFile = XML(testText);
trace("Cast-XML = "+castXmlFile); // no output for "castXmlFile"
}