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>();
                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;

            catch (Exception)

It is working perfectly for url
but does not working for url
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.