简体   繁体   中英

Android : How to import a database file from xml format into sqlite database?

I'm trying to import an xml file into sqlite database. Actually i have base64 encoded the file and exported to internal storage. now, i have no problem with decoding the file but what i need is to replace the existing database file in sqlite with the decoded xml file containing the database in xml format.How to achieve this? Any help is highly appreciated and thanks in advance...

if your solution can be a manual solution you can do this steps:

  1. decode base 64.
  2. write a code that read xml and generate query (or export xml to csv format using excel or your own code)
  3. import the this file to sqlite db using SQL Browser or similar tools.

is this your suitable answer?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM