<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.2.1</version>
</dependency>
String ccc = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Service><Header><TxnCode>P9000005</TxnCode><ResCode>00</ResCode><ResDesc>交易成功</ResDesc><MerchantNo>943172007630042</MerchantNo><NonceStr>cb0bad247657cb161fc0004a51c1d1a5</NonceStr><sign>5E607932A1CAC4FFE42D379AE74BD78C301E9384310D8E371425AF0EEF2038049CA95F58CC7C4F48900FAA6EE93BFAD705D2BCC544D6A061EDA23FDB5F83A736</sign></Header><Body><QrData>D1443610020230712160827100021838</QrData><QrDataUrl>http://test.gx966888.com/Nap-Online/qrcode/qrCodeAnalyse.do?qrCode=https://qr.95516.com/14436100/D1443610020230712160827100021838</QrDataUrl></Body></Service>";
String s = StringEscapeUtils.unescapeHtml4(ccc);
System.out.println(s);