The trace functions arguments are implemented as follows trace(...
arguments). Which means that all types of variables are accepted. Every type
of variable extends Object and with that every instance will have a toString
method. This is the method the trace function will call to display the
value.
: [Flashcoders] XML confusion
I don't think you're doing anything wrong, its just that the trace
function only accepts strings as parameters. So when you pass in your
XML variable it would throw an error if you were using a more strict
language like Actionscript 3 (at least I assume it throws an error
I am trying to convert a string to xml but for some reason when I convert to
xml it only displays the encoded string. See below the code snippet for
what is traced. Any idea what I am doing wrong?
Here is my test file
var encodedString:String = encoded string;
var XMLString:String;
You do not want to send an XML object, you just want to send the string.
It is the server that needs to convert the string to an XML Object. Just
send it the characters.
You may have to encode the string since HTTP has no idea about CDATA.
The browser and server will look at every character
I don't think you're doing anything wrong, its just that the trace
function only accepts strings as parameters. So when you pass in your
XML variable it would throw an error if you were using a more strict
language like Actionscript 3 (at least I assume it throws an error in
AS3, maybe it
5 matches
Mail list logo