private void getAlarmFromXml() throws SQLException, ParserConfigurationException, SAXException, IOException
    {
        ArrayList<Integer> alarmsFromSql = new ArrayList<Integer>();
        Connection con = null;
        try{
            con = getConnection();
            Statement stmnt = con.createStatement();
            
            ResultSet rs = stmnt.executeQuery("SELECT * FROM Alarm WHERE accepted = 0;");
            
            while(rs.next()){
               alarmsFromSql.add(rs.getInt("odinNr"));
            }
        
        try {
            ArrayList<Alarm> newAlarm =  xml.scanner();
        
        for(Alarm a : newAlarm)
        {
            if(!alarmsFromSql.contains(a.getOdinNr()))
            {
                String sql = "INSERT INTO Alarm (odinNr, destination, type, time, accepted, exercise) VALUES (?,?,?,?,?,?)";
                PreparedStatement ps = con.prepareStatement(sql);
                ps.setInt(1, a.getOdinNr());
                ps.setString(2, a.getDistination());
                ps.setString(3, a.getType());
                ps.setTimestamp(4, a.getTime());
                ps.setBoolean(5, false);
                ps.setBoolean(6, false);
                
                ps.executeUpdate();
            }
            
        }
        
        } catch (ParseException ex) {
            
        }
        }finally{
            if(con != null) con.close();
        }
    }