Hi All,
I am trying to use RSS feeds to show latest news. Initially i tried to fetch RSS using contentURL of HTMLPane but it throws an error to use XJSONDataSource (refer attached screen shot). Then i have used XJSONDataSource but it is unable to fetch live data; however if i save the data in an XML and if i use RestDataSource then it display the data. Below is my code:
I have also tried by setting dataFormat as 'xml' but it is not working.
Please guide me to correct solution.
Thanks,
Mahesh
I am trying to use RSS feeds to show latest news. Initially i tried to fetch RSS using contentURL of HTMLPane but it throws an error to use XJSONDataSource (refer attached screen shot). Then i have used XJSONDataSource but it is unable to fetch live data; however if i save the data in an XML and if i use RestDataSource then it display the data. Below is my code:
Code:
isc.XJSONDataSource.create({ ID:"newsRSSFeedsDS", dataFormat : "json", showPrompt:false, dataTransport : "scriptInclude", //dataURL:"http://rss.slashdot.org/Slashdot/slashdot", dataURL:"http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/bbcrss.xml", //dataURL:"../bbcrss.xml", /*transformResponse: function (dsResponse, dsRequest, data){ eval(data); }, */ recordXPath: "//item", fields: [ { name: "title" }, { name: "link", type: "link" } ] }); isc.ListGrid.create({ ID: "newsViewer", width: "100%", height:"300", dataSource:"newsRSSFeedsDS", autoFetchData: true, autoDraw:false, showHeader:false, fields: [ { name: "title" }, { name: "link", type: "link" } ] });
Please guide me to correct solution.
Thanks,
Mahesh
Comment