Getting one or more exception in xml Parsing.

I am creating a xamarin.Android app which need to support multiple language news . I am trying following code.

List<FeedItem> feedItemsList = new List<FeedItem>();
            try
            {
                HttpClient wc = new HttpClient();
                // wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
                var html = wc.GetStringAsync(new Uri(url)).Result;


                XElement xmlitems = XElement.Parse(html);
                // We need to create a list of the elements
                List<XElement> elements = xmlitems.Descendants("item").ToList();

                // Now we're putting the informations that we got in our ListBox in the XAML code
                // we have to use a foreach statment to be able to read all the elements 
                // Description 1 , Link1 , Title1 are the attributes in the RSSItem class that I've already added
                List<FeedItem> aux = new List<FeedItem>();
                foreach (XElement rssItem in elements)
                {
                    FeedItem rss = new FeedItem();

                    rss.Description = rssItem.Element("description").Value;
                    rss.Link = rssItem.Element("link").Value;
                    rss.Title = rssItem.Element("title").Value;
                    feedItemsList.Add(rss);

                }
            }
            catch (Exception)
            {
                throw;
            }

It is working perfectly for url http://news.google.com/?output=rss
but does not working for url https://news.google.com/news/feeds?pz=1&cf=all&ned=zh-Hans&hl=china&q=topstories&output=rss
And throwing the exception that one or more error occured . This code is working for all url in windows phone 8 app.

Sign In or Register to comment.