Skip to main content

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

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
-- 
View this message in context: http://old.nabble.com/-MOXy--escaping-special-characters-in-Strings-tp28759006p28759006.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top