Using JAXB, I'm creating an XML element and setting it's value using the
"setValue (String value)" method.
The value contains a combinations of some regular text characters
intermixed with \u000d (CR) and \u000a (LF) characters.
If I specify the value, for example, as a.setValue ("abc def"),
when I marshall the XML, it replaces the & with &. So the resultant
output becomes "abc
def". This makes the output entirely
different from what it ought to be.
To me this clearly seems to be incorrect behavior. I would have
expected JAXB to marshall character references as is, without changing
the & of a character reference to &
Is there any option etc. to control this behavior?
Thank you.