|
#1
|
|||
|
|||
|
So this should be easy. I have searched for forums and can't seem to come up with what is probably the obvious....
I am build a JSON string and want to return it in an xml response, so it seems best to wrap the JSON in a CDATA element. No problem. I also have cases where I will need to process CDATA elements coming in. So, given this XML: Code:
<JSON>
<JSONText>
<![CDATA[some text here]]>
</JSONText>
</JSON>
I am currently doing: Code:
var theJsonText = new XML(vmResponse.getMessage()).JSONText; |
|
#2
|
|||
|
|||
|
I can get my desired result with the following:
Code:
var theJsonText = new XMLList(String(new XML(vmResponse.getMessage()).JSONText)).toString(); |
![]() |
| Thread Tools | |
| Display Modes | |
|
|