Hi everyone. I want to implement in my site a rss news reader. In my country we have a newspaper named Clarin, wich offers rss services. In example, Clarin offers [url]http://www.clarin.com/suplementos/viajes/ultimo/viajes.xml
– Load xml file– Parse when is loaded– Show news on user’s screen
The truth is that I’m having trouble in first step. I have this script to show the server’s response:
<script>
var obj = new HttpRequest();
obj.setResponseType(1);
obj.oncomplete = function(){
document.getElementById(‘rss’).innerHTML = obj.getResponse();
}
obj.loadAsync(‘www.clarin.com/suplementos/viajes/ultimo/viajes.xml’);
</script>
HttpRequest is an object wich implements Ajax. This object works well. With obj.setResponseType(1) I determine that server’s response will be plain text. obj.oncomple is the function wich is executed when the ajax object is in readyState 4 (complete). obj.loadAsync is actually the function that allows me to load a file asynchronously. The code works well, but it shows the ‘Page Not Found’ screen. I check one thousand times the path of the file and it’s correct. So, what’s happening here?. Is this the way to implement rss news reader from javascript?. Regards.