simple-xml-converter

De serialize html escape characters using simple xml converter in retrofit android

荒凉一梦 提交于 2019-12-11 14:39:43
问题 How can we deserialize html escape characters in inner tags of xml of a response body to be saved in POJO classes using simple xml converter in retrofit android? <?xml version="1.0" encoding="utf-8"?> <sample> <outer> <test>data<</test>> </outer> </sample> 回答1: This should do it @Root public class Sample { @Element Outer outer; } public class Outer { @Text String text; public Test test; public Xml(@Text String text) { Serializer serializer = new Persister(); try { example = serializer.read

Proguard - PersistenceException: Constructor not matched for class

坚强是说给别人听的谎言 提交于 2019-12-01 15:59:15
问题 I am using retrofit2.0 in my app with simpleframework.xml library. The problem is when I run the app without proguard it works fine however when I run proguard I get the following Error in logs. E/ERROR: java.lang.RuntimeException: org.simpleframework.xml.core.PersistenceException: Constructor not matched for class A The class A has no/default constructor which should work. Still I added a No Argument Constructor . But that didn't rectify the issue. Class A @Root(name = "data",strict = false)