> I use JAXB to stuff some data into xml and pass it on to a client-side
> ajax application. I'm thinking I need to escape the data before
[quoted text clipped - 7 lines]
>
> -Kevin
JAXB handles this for you. So do the underlying DOM APIs. So does
SAX, if you want to go that way. Pretty much any sensible API for
processing XML will automatically translate between the value of an
attribute or text node (which does not contain escape sequences) and
the representation (which does).
Thus, if you serialize a bean containing the string "foo & bar" as a
field value using JAXB, the resulting XML should contain "foo &
bar" in the appropriate place.
-o