PDA

View Full Version : Reading an RSS Feed



pday
9 Feb 2011, 6:05 PM
Hi All,

I've been trying to wrap my head around reading in an rss feed to a data store but for some reason nothing works. The count of items is always 0. Any ideas? I can access the URL for the feed from Fiddler / a browser and it works just fine... My code is below



function readXml() {

// create the Data Store
var store = new Ext.data.Store({
// load using HTTP
proxy: new Ext.data.HttpProxy
({
url: proxyURL + '?url=' + feedURL
}),
autoLoad: true,

// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
// records will have an "Item" tag
//root: 'channel',
record: 'item'
}, [
// set up the fields mapping into the xml doc
// The first needs mapping, the others are very basic
'title','link','description']),
listeners:
{
'load': function() {}
}
});
}

pday
10 Feb 2011, 9:27 AM
Issue has been resolved. I had to place method: 'POST' in the HTTP proxy, as well as looking in the 'load' listener for items being assigned

lewisc
14 Jul 2011, 8:16 AM
any chance you could upload the fixed code please?