sencha + phonegap: reading local xml file
Is it possible to parse a local xml file when using ST and phonegap on Android (ICS)?
I tried it with a store
Code:
var mystore = new Ext.data.Store({
model: 'mymodel',
proxy: {
type: 'ajax',
url : 'myfile.xml',
reader: {
type: 'xml',
root: 'myroot',
record: 'myrecord'
}
}
});
[...]
mystore.load({
scope : this,
callback: function(records, operation, success) {
console.log('success: '+success);
}
});
but all I got was an Uncaught TypeError (Cannot read property 'length' of undefined)
the I tried Ajax.request:
Code:
Ext.Ajax.request({
url: 'myfile.xml',
success: function() {
console.log('sucess!!!');
},
failure: function() {
console.log('failure!!!');
}
})
I tried it with a different url:
Code:
url: 'file:///android_asset/www/myfile.xml'
but I had no success. :(
Did anyone have the same problem and solved it somehow?
//edit: On my Android 2.3 device I can use the store + xmlReader without problems, but on 4.0 it just doesnt work ?!?
//edit2: I tried to put all my js files into one combined js -> still no success
errors in logcat: SqliteDatabaseCpp: sqlite returned: error code = 14, msg = cannot open file at line [,,,], db=data/data/de.my.app/databases/webview.db
chromium: Uknown chromium error: -6
PhoneGapLog: file:///android_asset/www/app/combined.js Line 1 : Uncaught TypeError: Cannot read property 'length' of undefined