Avg. Rating 2.7

Problem

Sending XML data (or even a string that contains '<' and '>' characters) through a webservice (at least to .NET) doesn't work from Flex.

Solution

You need to embed the string in CDATA - I wonder why Adobe doesn't do this for me...

Detailed explanation

You can't just use "<![CDATA[" + field + "]]>" as this is seen as the end of the already active CDATA marker. The following construction works fine howver:

Application.application.wsBC.SaveProject("<!" + "[CDATA[" + xml.toXMLString() + "]]" + ">");

Can someone please tell me why Adobe doesn't do this automatically for string paramters????

Report abuse

Related recipes