How to convert xml to sqlite database on android platform?

I have an xml file with information inside. I want to convert an xml file to sqlite database without using an SD card on Android platform (Java language). Does anyone know how to do this?

0
source share
2 answers

Of course!

The project folder should have a folder called assets. Place your XML file in this folder and use Resource.openRawResource (int id) to capture the input stream for your XML file. Having done this earlier, I suggest that if your XML file is significant, use an event-based XML parser so that you can read the XML fragments rather than loading it into memory.

0

(DOM, SAX, JSON) sqlite XML . xml , Asset Manager. . .

[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/

0

All Articles