Greetings,
Is there any way to stop XMLBeans version 2.5.0 from escaping the
ampersand? Per system requirements, I am converting special characters as
follows:
return str.replace("&", "&").replace("\"", """).replace("'",
"'").replace("<", "<").replace(">", ">");
However, xmlbeans is escaping the ampersand (" becomes &x0022;);
therefore, the character comes out as code (&#x0026; instead of &) when
the XML is read by another application.
XmlOptionCharEscapeMap does not have the capability to handle the codes I
need to use. When I specify
escapes.addMapping('&', XmlOptionCharEscapeMap.HEXADECIMAL);
the ampersand comes out as & instead of &.
It's likely that someone is going to respond saying xmlbeans has to escape
the ampersand because it is a mandatory restriction of XML. If that is a
response, then please provide some type of solution to my problem because I
have to use the codes listed above.
Thanks.
-- Michelle