Image

Imagebateleur wrote in Imageflashdev 😡annoyed

Puzzling XML Behaviour

Using the XML.send method in a simple Flash 8 application I'm seeing an extremely odd effect. The symptoms are as follows:

* If I add a string node to the XML document it seems to use XML entities to encode certain characters (like > for >). This seems correct.
* If I use the nodeValue property to retrieve such a string, it comes back correctly decoded. Also good.
* But... if I use XML.send to send the document to my server it arrives in a very odd state. Spaces are encoded as if in a URL (as %20), but > is encoded as ;gt=; and indeed other & symbols are also replaced by semicolons and semicolons in the XML by equals-semicolon.

I've never run across this format before and it seems odd to say the least. But things get even stranger... if I adapt my CGI script to decode this nonsense and restore the original XML then...

* I download the uploaded XML document from Flash and it again encodes all the & and ; symbols in the same bizarre way described above.
* Worse still, when I download an XML file containing string elements and extract their node values they are corrupted, since Flash itself doesn't decode this odd format it's used.

Is this a bug ? If so, is it something I can get a patch for ?

If it's not a bug, what on earth's going on ?

Any help gratefully received.