Search code examples
c#actionscript-3serializationflash-builderdeserialization

Actionscript encode, C# decode XML


I have a XML string in Actionscript (FlashBuilder). I am encoding it using escape(str) and sending it to C# using web services.

Now, I want to deserialize this string but the problem is, when I decode the string it decodes everything inlcuding "&" and then the XMLSerializer complains.

And if I don't decode it then the deserialized string comes with %20 instead of spaces.

Is there an easy way of decoding the escaped string in C# to feed into XML Serializer?


Solution

  • Looks like you're confusing URL-encoding with XML/HTML-encoding. actionscript's escape method URL-encodes. To XML/HTML-encode see this stackoverflow answer.