将SQLite数据库导出到XML文件 [英] Export SQLite database into XML file

查看:95
本文介绍了将SQLite数据库导出到XML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从数据库导出数据并将其存储在XML文件中?

How can I export data from database and store it in an XML file?

我的数据库架构如下:

private static final int DATABASE_VERSION = 4;
public static final String DATABASE_NAME = "instruments.db";
private static final String TABLE_NAME = "instrument_table";
public static final String COL_1 = "ID";
public static final String COL_2 = "NAME";
public static final String COL_3 = "LOCATION";
public static final String COL_4 = "INFORMATION";
public static final String COL_5 = "PHOTO";

关于如何实现这一目标的任何建议?

Any suggestions on how to achieve this?

推荐答案

看看教程让您开始.您将需要使用XmlSerializer创建XML文件.此帖子也应为您提供帮助.

Have a look at this post and this tutorial to get you started. You will need to use XmlSerializer to create the XML file. This post should also help you out.

这篇关于将SQLite数据库导出到XML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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