Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1.1
-
Component/s: None
-
Labels:None
Description
Hi,
We are using XSTREAM object to convert an object to an xml and vice-versa.
While doing so, the object that we are converting to an xml contains a String which has a value with "\r\n". While converting from an Object to an XML the "\r\n" characters are retained properly.
But when convert the xml back to the Object using fromXml(String) method, the "\r" characater is being REMOVED. only "\n" character remains in the string.
This is causing a problem in our project as one of the programs in our project is expecting a "\r\n" while parsing this String.
Please help us on how to solve this issue. Is Carriage Return "\r" being supported by XSTREAM in any later versions after 1.0.1 version??
If so, please let us know on the same so that we can use that version in our project.
Will Await for your reply at the earliest.
Chandru,
I believe this may be an issue in the underlying XML parser. One thing you could try is another parser to see if that makes any difference. If you construct XStream like this: new XStream(new DomDriver()) it will attempt to use whichever DOM library you have in the path. Let me know if that makes any difference.