angularjs [ionic] error open file from copy to divece

I am creating an application for my internship, and I have a problem, I need to go to a server, and copy the data from a file to the local data base (so the user can have access to offline application). In phonegap, was working perfectly, but as the layout was changed to ionic, the code stopped working can anyone help?

It is my code:

.controller('MapCtrl', function($scope) {  
var conect;
        if(navigator && navigator.connection && navigator.connection.type === 'none') 
        {
            conect=0;
        }
        else 
        {
            conect=1;
        }
 var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
 db.transaction(populateDB, errorCB);
  function populateDB(tx) {
tx.executeSql('DROP TABLE IF EXISTS DEMO');
                tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id INTEGER, NEVENTO, DATA, HORA, LOCAL, FREGUESIA, CATEGORIAS, DESC_BRE, DESC, LAT, LON)');
                if (window.XMLHttpRequest)
                {// code for IE7+, Firefox, Chrome, Opera, Safari
                    var xmlhttp = new XMLHttpRequest();
                }
                else
                {// code for IE6, IE5
                    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.open("GET", "https://dl.dropboxusercontent.com/u/2906080/event_catalog.xml", false);
                xmlhttp.send();
                xmlDoc = xmlhttp.responseXML;
                var x = xmlDoc.getElementsByTagName("EVENT");
                for (i = 0; i < x.length; i++)
                {
                    var xName = x[i].getElementsByTagName("NEVENTO")[0].childNodes[0].nodeValue;
                    var xData = x[i].getElementsByTagName("DATA")[0].childNodes[0].nodeValue;
                    var xHora = x[i].getElementsByTagName("HORA")[0].childNodes[0].nodeValue;
                    var xLocal = x[i].getElementsByTagName("LOCAL")[0].childNodes[0].nodeValue;
                    var xFregsia = x[i].getElementsByTagName("FREGUESIA")[0].childNodes[0].nodeValue;
                    var xCategoria = x[i].getElementsByTagName("CATEGORIAS")[0].childNodes[0].nodeValue;
                    var xDescbre = x[i].getElementsByTagName("BRE")[0].childNodes[0].nodeValue;
                    var xDesc = x[i].getElementsByTagName("DESC")[0].childNodes[0].nodeValue;
                    var xLat = x[i].getElementsByTagName("LAT")[0].childNodes[0].nodeValue;
                    var xLon = x[i].getElementsByTagName("LON")[0].childNodes[0].nodeValue;
                    tx.executeSql('INSERT INTO DEMO (id, NEVENTO, DATA, HORA, LOCAL, FREGUESIA, CATEGORIAS, DESC_BRE, DESC, LAT, LON) VALUES ("' + i + '", "' + xName + '", "' + xData + '", "' + xHora + '","' + xLocal + '", "' + xFregsia + '","' + xCategoria + '", "' + xDescbre + '","' + xDesc + '","' + xLat + '","' + xLon + '")');
                } 
                    alert("Base de dados actualizada!!");
      }
})

I put alerts in code, code missed after "xmlhttp.send();" i tink is problem in CROSS DOMAIN some could confirm and could help was very good. once again, thank you all