Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [MOXy] escaping special characters in Strings

Hi Polly,

Yes that is a bug. You could get around it with a converter, but we should be able to supply you with a path for this quickly. Once we have the patch ready, are you able to uptake the EclipseLink 1.1.4 stream.

-Blaise

polly.c.chang wrote:
Hi,

Sometimes we have String data that contains special characters like
double-quotes.  When we marshal this String, the double-quotes are rendered
as-is.  This results in invalid XML.  For example, notice the double-quotes
around the word "quoted" below:

<?xml version="1.0" encoding="UTF-8"?>
<Foo documentation="A "quoted" value that creates invalid xml.">
...
</Foo>

Then of course when we try to use MOXy to unmarshal the invalid XML, we get
an exception.  We have tested both XML attributes and text() nodes.  Both
have the same marshalling behavior.  Does EclipseLink automatically escape
special characters?  Or do we need to write a Converter to do this?

We are using EclipseLink 1.1.2 if it makes any difference.

Thanks!
Polly


Back to the top