Android的XML对象序列化 [英] Android XML Object Serialization

查看:211
本文介绍了Android的XML对象序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个对象序列化到XML中的Andr​​oid。

I would like to serialize an object to XML inside Android.

任何库建议?

PS:已经尝试过XStream的,但它不能与Android的序列化枚举。问题就在这里:<一href="http://stackoverflow.com/questions/3533894/serialization-problem-with-enums-at-android">http://stackoverflow.com/questions/3533894/serialization-problem-with-enums-at-android

PS: Already tried XStream, but it doesn't serialize enums correctly with Android. The issue is here: http://stackoverflow.com/questions/3533894/serialization-problem-with-enums-at-android

推荐答案

不幸的是,我不认为这是在Android的对象的XML序列化一个很好的解决方案呢。大多数现有的解决方案都太重量级的移动应用中使用,并且依赖于事情的Andr​​oid不支持。

Unfortunately I don't think there is a good solution for xml serialization of objects in Android yet. Most of the existing solutions are too heavyweight for use in mobile apps, and depend on things Android doesn't support.

有关的XML选项的概述,请参见中使用XML Android的

For an overview of XML options, see working with xml in Android.

这篇关于Android的XML对象序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆