I’m using SimpleXml on Android to deserialize an xml which I have no control over. Now, every time the xml changes, it brakes my app because I don’t have the new element defined in my object class. Is there a way I could specify SimpleXML just to ignore those missmaps? Looked at the documentation and can’t find anything to help me solve it.
Share
I’m pretty sure you can get around the strict mapping by replacing your regular
@Rootdeclaration with@Root(strict=false), which will eliminate the requirement that every element should match a field in your class definition. More precisely, from the documentation:There’s also an example given in the list of tutorials on the Simple XML project site.