I am currently attempting to download, parse, and display a list from the XML data received from my server using Backbone.js. Below is the code snippet:
var Item = Backbone.collection.extend({
url: "http://myurl.com/file.xml",
parse: function() {
console.log("parse");
},
success: function(data) {
console.log(data);
},
error: function() {
console.log("error");
}
});
var View1=Backbone.view.extend({
initialize: function() {
var item = new Item();
item.fetch();
}
});
Upon checking in the Chrome extension, the XML file is successfully downloaded, but the breakpoints set in the parse
, success
, error
sections are leading directly to the error
section.
Furthermore, there are 3 arguments present, but I am unable to extract any information from them.