2

I am trying to read rss feed from bbc.com. I successfully read ess from bbc.com. But when I read rss from my local computer.. RSS not found... My Codes are here...

    <?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Weather</title>
<link>local://localhost/ali/WeatherApp/</link>
<description>Weather Update Website</description>
<item>
  <title>Entry Title</title>
  <link>Link to the entry</link>
  <guid>http://example.com/item/123</guid>
  <pubDate>Sat, 9 Jan 2010 16:23:41 GMT</pubDate>
  <description>[CDATA[ This is the description. ]]</description>
</item>
</channel>
</rss>

And Jquery code is

 <link href="jquerymobile/jquery.mobile-1.3.1.css" rel="stylesheet" type="text/css"/>
<link href="zrssfeed/jquery.zrssfeed.css" rel="stylesheet" type="text/css" />

<script src="jquerymobile/jquery.js" type="text/javascript"></script>
<script src="jquerymobile/jquery.mobile-1.3.1.js" type="text/javascript"></script>

<script src="jquery.zrssfeed.min.js" type="text/javascript"></script>
<script src="zrssfeed/jquery.zrssfeed.min.js" type="text/javascript"></script>
<script type="text/javascript">
var selectVal="";
$(document).ready(function () {

    //var conceptName = $('#select_menu :selected').text();

    //$('#select_menu').change(function() {
   // assign the value to a variable, so you can test to see if it is working
   // selectVal = $('#select_menu :selected').val();
    //alert(selectVal);
//});
    //var conceptName = $("select_menu").filter(":selected").val();
    $("#Submit").click(function(){
    selectVal = $('#select_menu :selected').val();
    if(selectVal=='New York')
    {
    $('#test').rssfeed('http://demo.sslwireless.com/apk/rss.xml'); 
    }
    else if(selectVal=='London')
    {
    $('#test').rssfeed('http://open.live.bbc.co.uk/weather/feeds/en/2643743/observations.rss'); 
    }
    else if(selectVal=='Moscow')
    {
    $('#test').rssfeed('http://open.live.bbc.co.uk/weather/feeds/en/524901/observations.rss'); 
    }
    else if(selectVal=='Tokyo')
    {
    $('#test').rssfeed('http://open.live.bbc.co.uk/weather/feeds/en/1850147/observations.rss'); 
    }

        //alert(selectVal);
        });
});

</script>

Can any one help??

Kara
  • 6,115
  • 16
  • 50
  • 57
  • Do you have empty space before xml tag? " ". It may result as an error. – Aivar May 06 '13 at 11:14
  • In your jQuery code there are only external feeds. How do you set up feed for your local computer? IF you set it up as just location in your machine hard drive then it will not work. It must be link to webserver. Example http://localhost/yourfeed.xml – Aivar May 07 '13 at 07:22
  • I also try like this,but not working.. – Ashekur Rahman Molla Asik May 08 '13 at 08:50
  • Could you give more info about what happens. Example debug it with chrome browser click ctrl+shift+j and see what it writest to console and also what info is in network tab. – Aivar May 08 '13 at 12:43
  • Actually no need. it uses google api so you cant use localhost as a url. You need full working web address accesable from outside. – Aivar May 08 '13 at 12:54

0 Answers0