How to Import Data from XML to SQLite in Android SDK


show more Importing data from XML to SQLite provides you with in-depth training on Developer. Taught by David Gassner as part of the Android SDK: Local Data Storage show less
please wait ...

Importing data from XML to SQLite

I've previously described how to read data from an XML file, showing you two different parsers that you can use, and I've also described how to create new rows in an SQLite database table. I'm going to combine these two features. I'm going to use an XML file to seed my application with data and then move the data over to the SQLite database as the application launches for the first time. I'll be doing all of the work in the main activity class in this version of my project, ImportToDb.

In the main activity class down at the bottom of the class I have a method called Create data, and right now I'm creating some fake data. I'd like to replace this code with code that imports from XML and exports to the database. So I'm just going to select and delete all of this code. If you need this code back again, you can find it in the previous version of the project in the Solutions folder. I'll go get code to import data from an XML file, I'll move back up to the On Crea...

Importing data from XML to SQLite
Video duration: 5m 15s 3h 41m Intermediate

Viewers:

Importing data from XML to SQLite provides you with in-depth training on Developer. Taught by David Gassner as part of the Android SDK: Local Data Storage

Subject:
Developer
Software:
Android Java
Author:
please wait ...