Hi Bill,
Bill Schoolfield wrote:
> Hi I have a case where the special chars in an text element were
> escaped as expected. But when the xml is reloaded, the reverse does
> not happen.
>
> <item>...<test>...</item>
>
> Becomes
>
> <item>...<test>...</item>
>
> and remains that way after a round trip.
>
> What do I need to do to prevent this?
Actually I don't think that you can read or write the first version with
XStream at all. XStream will always escape those two characters in a String
and unescape them at deserialization. Actually the latter is already done by
the underlaying XML parser.
If you read XML with such a construct, you let XStream operate more or less
in undefined mode, because it's internal structures do not support mixed-
mode XML. If "item" represents a String type, it depends on the parser what
happens when XStream requests for the text of the element.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email