public static void exportSettingsToXml(String file, SQLiteDatabase db) throws SAXException, IOException { File f = new File(file); Writer writer = new OutputStreamWriter(new FileOutputStream(f, false)); SqliteElement.exportDbAsXmlToStream(db, writer); writer.close(); }
public static void importSettingsFromXml(String file, SQLiteDatabase db) throws SAXException, IOException { Reader reader = new InputStreamReader(new FileInputStream(file)); SqliteElement.importXmlStreamToDb(db, reader, ReplaceStrategy.REPLACE_EXISTING); }