Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replace all escape sequences with non-escaped equivalent strings in java

I have a string like this:

<![CDATA[<ClinicalDocument>rest of CCD here</ClinicalDocument>]]>

I'd like to replace the escape sequences with their non-escaped characters, to end up with:

<![CDATA[<ClinicalDocument>rest of CCD here</ClinicalDocument>]]>
like image 888
Mark Avatar asked Aug 24 '26 00:08

Mark


1 Answers

StringEscapeUtils.unescapeXml() from commons-lang might be the thing you are looking for.

like image 98
Grzegorz Oledzki Avatar answered Aug 26 '26 14:08

Grzegorz Oledzki