Reputation: 8772
I am using Simple framework to serialize an annotated object to xml. Everything works fine, except that framework while serializing converts all occurance of "
to "
How can I avoid this ?
Also how can i get rid of the indentations ?
Upvotes: 0
Views: 326
Reputation: 25350
Isn't xml meant to do so? I don't know any option to disable this. But as a workaround you may implement a Transform
, which (un-)escapes your quoutes.
Edit: Possible the org.simpleframework.xml.stream.Formatter
class can help you. This will escape those sequences. But not sure if you can customize it per code or you have to work on source-level.
Disable indention:
Serializer ser = new Persister(new Format(0));
Will set indention count to 0.
Please see Format
.
Upvotes: 1