Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to unescape xml in java?

Unfortunately all about this topic is too old, so i need a help.

How i can unescape xml in java? I tried StringEscapeUtils.unescapeXml
from
import org.apache.commons.lang3.StringEscapeUtils; but it’s deprecated.
I also tried StringEscapeUtils as an object but there is only escapeHtml14
Next I tried answer from this Why was org.apache.common.lang3 StringEscapeUtils deprecated? adding to maven, but it didn’t work too.

Also tried
enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

with adding

<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-text -->
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-text</artifactId>
    <version>1.10.0</version>
</dependency>

to maven.

Can somebody help me please?

>Solution :

Try commons text StringEscapeUtils it should work fine

import org.apache.commons.text.StringEscapeUtils have StringEscapeUtils.unescapeXml();

This is a build issue it is working in my system, I cross-checked in apache commons text javadoc

enter image description here

Please clean install using maven and check.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading