Hi,
I have a report with special caracters
when I generate the jrxml String it includes special characters and I get an error at line 2 (see the following)
(in jrxml, I have for example a static Text "<text><![CDATA[" + field.getFldText() + "]]></text>" with special characters in field.getFldText())
line 1 - InputStream jrxmlInputStream = new ByteArrayInputStream(jrxml.toString().getBytes());
line 2 - JasperDesign jasperDesign = JRXmlLoader.load(jrxmlInputStream);
So, I try to escape special characters (xml escaping) the raw data ( field.getFldText() ) and to use an imported class in jrxml to unescape back ( xml unescaping ) the data
<import value=\\"org.apache.commons.lang.StringEscapeUtils\\" /> under jasperReport tag
And for the static Text
<text><![CDATA[StringEscapeUtils.unescapeXml(").append(StringEscapeUtils.escapeXml(field.getFldText())).append(")]]></text>
But it seems that org.apache.commons.lang.StringEscapeUtils.unescapeXml() is not used as a java class but as a raw String (in jrxml, I can see the following: <text><![CDATA[StringEscapeUtils.unescapeXml(Do NOT use the following symbols: \\ (backward slash), é, Ä, ß, µ (non-English language symbols), °C (superscripts), ¾ (fractions), symbols < and > and quotation marks)]]></text>
I conclude that I don't use the right way to use imported java class. Do you have an idea ?
Thank you in advance for your answers