如何将XML转换为SQLite数据库在Android平台?转换为、如何将、数据库、平台

2023-09-07 13:14:15 作者:戀上妳de吻

我有内部消息XML文件。我想XML文件SQLite数据库转换而不android平台(Java语言)使用的是SD卡。没有人有任何想法怎么办呢?

I have a xml file with info inside. I want to convert the xml file to sqlite database without using a SD card in android platform(Java Language). Does anyone have any idea how to do it?

推荐答案

您可以使用使用XML文件更新SQLite数据库解析器(DOM,SAX,JSON)。把你的XML文件中的资产的文件夹,然后用Asset Manager的帮助下阅读。有关此更多信息请参考下面的链接。

You can use parser(DOM, SAX, JSON) for update sqlite database using the XML file. Put your xml file in the assets folder and then read with help of Asset Manager. For more info about this refer below links.

[http://www.androidhive.info/2012/05/android-rss-reader-application-using-sqlite-part-2/] [1]

[http://www.androidhive.info/2012/05/android-rss-reader-application-using-sqlite-part-2/][1]

的http://martin.cubeactive.com/android-filling-a-table-from-resource-file-using-xml-sqlite/