Hi Ajaya,
Ajaya Sahoo wrote:
> Hi,
>
> I have an element with the following value ( <condition> a > b
> </condition> ). When I put the value in the object and use Xstream.toXML
> the value comes <condition> a > b</condition>. How to get back the
> exact string with > character?
You cannot, because what you have then is no longer XML. It might look like
XML, but no XML parser can ever read that anymore.
The only option is to introduce a CDATA section:
<condition><![CDATA[a > b]]></condition>
You have to overwrite the writeText method for the PrettyPrintWriter for
this.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email