I’m having a response something like this,
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cbv2="urn:cbv2" xmlns:date="http://exslt.org/dates-and-times" xmlns:n="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<cbv2:processResponse>
<cbv2:out>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<INProfileResponse>
<Header>
<SystemCode>19</SystemCode>
<MessageText>SYS00019 Login Error. Please contact our Technical Support Center (888.839.0119) if you need assistance decoding the error messages.</MessageText>
<ReportDate>20180426</ReportDate>
<ReportTime>071738</ReportTime>
</Header>
</INProfileResponse>
]]>
</cbv2:out>
</cbv2:processResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I want to unwrap ‘<![CDATA’ text to be unwrapped and put it under ‘’. The output should look like this,
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cbv2="urn:cbv2" xmlns:date="http://exslt.org/dates-and-times" xmlns:n="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<cbv2:processResponse>
<cbv2:out>
<INProfileResponse>
<Header>
<SystemCode>19</SystemCode>
<MessageText>SYS00019 Login Error. Please contact our Technical Support Center (888.839.0119) if you need assistance decoding the error messages.</MessageText>
<ReportDate>20180426</ReportDate>
<ReportTime>071738</ReportTime>
</Header>
</INProfileResponse>
</cbv2:out>
</cbv2:processResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
One way is, I can do it through JS, just by replacing CDATA specific tags and reform the response. I’m not sure if we have any XSLT policy or some other way to make this happen. Eventually, I’m going to convert the response in JSON.