public void updateDatabase() {
   // Check connection
   try {
     URL u = new URL("http://www.studentenwerk.bremen.de/");
     HttpURLConnection huc = (HttpURLConnection) u.openConnection();
     huc.connect();
     server_down = false;
   } catch (Exception e) {
     Log.v(TAG, "Warning in init(): Server down. Switching to test server...");
     server_down = true;
   }
   // Initialize the mensaList
   if (server_down == false) {
     // mensaList.add(new Mensa("UNI_GW2", UNI_GW2, 0));
     mensaList.add(new Mensa("UNI_BOULEVARD", UNI_BOULEVARD, 1));
     mensaList.add(new Mensa("HSB_NEUSTADTSWALL", HSB_NEUSTADTSWALL, 2));
     mensaList.add(new Mensa("HSB_WERDERSTR", HSB_WERDERSTR, 3));
     mensaList.add(new Mensa("HSB_AIRPORT", HSB_AIRPORT, 4));
     mensaList.add(new Mensa("BHV", BHV, 5));
   } else {
     mensaList.add(new Mensa("UNI_BOULEVARD", UNI_BOULEVARD_cache, 1));
     mensaList.add(new Mensa("HSB_NEUSTADTSWALL", HSB_NEUSTADTSWALL_cache, 2));
     mensaList.add(new Mensa("HSB_WERDERSTR", HSB_WERDERSTR_cache, 3));
     mensaList.add(new Mensa("HSB_AIRPORT", HSB_AIRPORT_cache, 4));
     mensaList.add(new Mensa("BHV", BHV_cache, 5));
   }
   initFoodDayList();
   // Create XML database with the XML template
   xmlHandler = new XMLHandler(mensaList);
   for (Mensa mensa : mensaList) {
     parsingHTML(mensa.getURL());
     saveToDatabase(mensa);
   }
   // Save XML database to file
   // writeDatabaseToInternalStorage();
   writeDatabaseToExternalStorage();
 }