Join David Gassner for an in-depth discussion in this video Importing data from XML to SQLite, part of Android SDK: Local Data Storage.
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 Create method, and I'll locate this code that I…
- Exploring local data storage options
- Creating an Android virtual device
- Starting a new project
- Defining preferences with Java and activities
- Creating and reading JSON and XML data files
- Creating a new SQLite database
- Inserting and retrieving data in the database
Skill Level Intermediate
1. Getting Started
2. Using Application Preferences
3. Using Internal and External File Storage
4. Working with SQLite Databases
5. Managing and Displaying SQLite Data
Improving the data display9m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.