I am new at Mojo framework and Palm webOS. I want to just retrieve data from XML files using xmlhttprequest (Ajax). I am trying to get data from following script.
this.items = [];
var that = this;
var request = new Ajax.Request("first/movies.xml", {
method: 'get',
evalJSON: 'false',
onSuccess:function(transport){
var movieTags = transport.responseXML.getElementsByTagName('movie');
for( var i = 0; i < movieTags.length; i++ ){
var title = movieTags[i].getAttribute('title');
that.items.push({text: title});
}
},
onFailure: function(){ alert('Something went wrong...') }
});
My XML files are in the first/movies.xml folder. From that I am trying to access and retrieve data. but not display anything in the screen of Palm Pre emulator.
So can anyone is having idea about this issue? Please give a link where can I find the source code for getting data from XML files in webOS.