I've Googled the XMLSerializer in Android, but I found it's totally different from .NET. What I need is that, from a Serializable Class, I can write them to a XML file, and then read the 开发者_运维知识库XML file to return the class's properties values automically.
I need that because: I'm creating a game for Android, with a lot of settings and levels, so I design them by a editor made by .NET. Now I want that the XML file can be read by both the editor (by .NET) and the game (by Java/Android SDK). The class should be totally the same (all the properties, methods, names, ...).
Thanks for reading.
Check out this answer. Sounds similar to the jackson parser bindings, which can serialize and unserialize Java objects and beans to/from JSON.
精彩评论