I have this message that has a CDATA content. I want to turn it into the unCDATA format such as :
<?xml version="1.0" encoding="UTF-8"?>
<mymessage <![CDATA[<xyz>1234</xyz>]]></mymessage>
turn into
<?xml version="1.0" encoding="UTF-8"?>
<mymessage <xyz>1234</xyz></mymessage>
So I want to get rid of the CDATA and convert my message to a stripped version. Anyone knows how to use xsl to do this ? Or is it possible to do such thing in xsl ?
You can even avoid the escape characters (when proper xml nodes in CDATA blocks!) by applying the following:
which, when applied to
gives
In general of course, this is not recommended (the CDATA block was placed there for a reason), so best leave out the template matching text(). In that case the result will be