How to convert XML to JSON including the "CDATA"




<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:***="*****">
<soapenv:Header />
<soapenv:Body>
....
.....
<![CDATA[ some properties... ]]> /* This(CDATA) section is not getting generated in JSON form */
.....
....
</soapenv:Body>
</soapenv:Envelope>


pseudo code

String xmlFile = readFile("C:\appvol\sampleMessage_to41PHTTP.xml");

JSONObject jsonObj = org.json.XML.toJSONObject(xml_);

syso(jsonObj);


Tiada ulasan:

Catat Ulasan