title: An exception of type 'System.Xml.XmlException' occurred in System.Xml.ni.dll
body: <p>actually i already did some windows phone 8 application with xml parsing like parsing news rss feeds and were working fine., but i have problem with my latest project., </p>
  
  <p>i have one political news rss feed (<a href="http://ibnlive.in.com//ibnrss//rss//india//india.xml" rel="nofollow">http://ibnlive.in.com//ibnrss//rss//india//india.xml</a>) and trying to parse it and show it in list.,</p>
  
  <p>but i cant parse it., i hope my code is correct</p>
  
  <p>Here is my code c#</p>
  
  <pre><code>namespace indianPolitics
  {
  public partial class news1 : PhoneApplicationPage
  {
      ProgressIndicator _progressIndicator = new ProgressIndicator();
      public news1()
      {
          InitializeComponent();
          Loaded += news1_Loaded;
      }
      void news1_Loaded(object sender, RoutedEventArgs e)
      {
          WebClient _client = new WebClient();
          _client.DownloadStringCompleted += _client_DownloadStringCompleted;
          _client.DownloadStringAsync(new Uri("http://ibnlive.in.com//ibnrss//rss//india//india.xml", UriKind.Absolute));
  
          SystemTray.ProgressIndicator = _progressIndicator;
          _progressIndicator.IsIndeterminate = true;
          _progressIndicator.IsVisible = true;
      }
      private void _client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
      {
          if (e.Error != null)
          {
              Deployment.Current.Dispatcher.BeginInvoke(() =&gt;
              {
                 MessageBox.Show("Error Message"+e.Error.Message);
              });
           }
          else
          {
              try
              {
                  MessageBox.Show("Result Before Parse:"+e.Result);
                  XDocument xmlDoc = XDocument.Parse(e.Result);
                  var all = xmlDoc.Descendants("channel");
                  List&lt;News1&gt; _singleRsses = new List&lt;News1&gt;();
                  foreach (var item in all)
                  {
                      var itemVedio = item.Descendants("item");
                      foreach (var xElement in itemVedio)
                      {
                          string _title = xElement.Element("title").Value;
                          string _description = xElement.Element("description").Value;
                          string pubDate = xElement.Element("pubDate").Value;
                          string link = xElement.Element("link").Value;
  
                          News1 _singleRss = new News1
                          {
                              Title = _title,
                              Description = _description,
                              PubDate = pubDate,
                              Link = link
                          };
                          _singleRsses.Add(_singleRss);
                      }
                  }
                  singleListbox.DataContext = _singleRsses;
              }
              catch (Exception exp)
              {
                  MessageBox.Show("Exception: "+exp);
                  _progressIndicator.IsIndeterminate = false;
                  _progressIndicator.IsVisible = false;
              }
              finally
              {
                  _progressIndicator.IsIndeterminate = false;
                  _progressIndicator.IsVisible = false;
              }
          }
      }
      private void News1Grid_Tap(object sender, System.Windows.Input.GestureEventArgs e)
      {
  
      }
  }
  public class News1
  {
      public string Title { get; set; }
      public string ImageSource { get; set; }
      public string Description { get; set; }
      public string PubDate { get; set; }
      public string Link { get; set; }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and my XAML code</p>
  
  <pre><code>     &lt;Grid x:Name="ContentPanel" Grid.RowSpan="2"&gt;
          &lt;Grid.Resources&gt;
              &lt;DataTemplate x:Key="NewsDateTemplate"&gt;
                  &lt;Grid Tag="{Binding Link}" x:Name="News1Grid" Tap="News1Grid_Tap"  Width="420" Visibility="Visible" Margin="0,0,0,10" &gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto"/&gt;
                          &lt;RowDefinition Height="Auto"/&gt;
                          &lt;RowDefinition Height="Auto"/&gt;
                          &lt;RowDefinition Height="Auto"/&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;TextBlock Text="{Binding PubDate}" Foreground="LightGoldenrodYellow" FontSize="18"/&gt;
                      &lt;Border Background="#FFD69F0B" Grid.Row="1"&gt;
                          &lt;TextBlock  Text="{Binding Title}" Foreground="Black" TextWrapping="NoWrap" FontSize="20" FontWeight="Bold"/&gt;
                      &lt;/Border&gt;
                      &lt;Grid Width="420" HorizontalAlignment="Left" Grid.Row="2" Margin="0,0,0,10"&gt;
                         &lt;TextBlock Foreground="Black" Text="{Binding Description}" TextWrapping="Wrap" TextTrimming="WordEllipsis"/&gt;
                      &lt;/Grid&gt;
                      &lt;Rectangle Fill="Black" Height="1" Grid.Row="3" Opacity=".5"/&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/Grid.Resources&gt;
          &lt;Border VerticalAlignment="Top" Height="80" Background="LightGray"&gt;
              &lt;TextBlock Name="ministerHeader" Text="Ministers" FontSize="40" TextTrimming="WordEllipsis" TextWrapping="Wrap" VerticalAlignment="Center" TextAlignment="Center" Foreground="Black" FontFamily="Times New Roman" &gt;&lt;/TextBlock&gt;
          &lt;/Border&gt;
          &lt;ListBox Name="singleListbox" Margin="0,85,0,0" ItemsSource="{Binding}" ItemTemplate="{StaticResource NewsDateTemplate}"&gt;
  
          &lt;/ListBox&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p>Note: if i parse with other xml feeds like this (<a href="http://www.skysports.com//rss//0,20514,11827,00.xml" rel="nofollow">http://www.skysports.com//rss//0,20514,11827,00.xml</a>) means </p>
  
  <p>it parse that xml fine and show data in list box., </p>
  
  <p>i have also print that result from </p>
  
  <pre><code>  private void _client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) 
  </code></pre>
  
  <p>event handler with </p>
  
  <pre><code>    MessageBox.Show("Result Before Parse:"+e.Result);
  </code></pre>
  
  <p>and it shows " empty " message box., </p>
  
  <p>And also in </p>
  
  <pre><code>     catch (Exception exp)
              {
                  MessageBox.Show("Exception: "+exp);
               }
  </code></pre>
  
  <p>it shows error like this:</p>
  
  <pre><code>        "Exception: Root Element Missing"
  </code></pre>
  
  <p>Please some one give me correct solution for that ., i have most couple of weeks getting struggle with that ., </p>
  
  <p>thanks in advance., </p>