title: When ever I want to load XML file exception occur: System.Xml.XmlException: Data at the root level is invalid
body: <pre><code>&lt;?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?&gt;
  &lt;Collection&gt;
      &lt;Book Id='1' ISBN='1-100000ABC-200'&gt;
          &lt;Title&gt;Principle of Relativity&lt;/Title&gt;
          &lt;!-- Famous physicist --&gt;      
          &lt;Author&gt;Albert Einstein&lt;/Author&gt;
          &lt;Genre&gt;Physics&lt;/Genre&gt;
      &lt;/Book&gt;
      &lt;Book Id='2' ISBN='1-100000ABC-300'&gt;
          &lt;!-- Also came as a TV serial --&gt;
          &lt;Title&gt;Cosmos&lt;/Title&gt;
          &lt;Author&gt;Carl Sagan&lt;/Author&gt;
          &lt;Genre&gt;Cosmology&lt;/Genre&gt;
      &lt;/Book&gt;
      &lt;!-- Add additional books here --&gt;
  &lt;/Collection&gt;
  </code></pre>
  
  <p>When application start after 3 sec this exception occur:</p>
  
  <blockquote>
    <p>System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1</p>
  </blockquote>
  
  <p>Why this exception is occurring while this XML code is correct and loading in console application and there is no exception occurring in console application.</p>
  
  <pre><code>using System;
  using Android.App;
  using Android.Content;
  using Android.Runtime;
  using Android.Views;
  using Android.Widget;
  using Android.OS;
  using System.Xml;
  using System.Xml.Linq;
  using System.Linq;
  
  namespace App16
  {
      [Activity(Label = "App16", MainLauncher = true, Icon = "@drawable/icon")]
      public class MainActivity : Activity
      {
          int count = 1;
  
          protected override void OnCreate(Bundle bundle)
          {
              base.OnCreate(bundle);
  
              // Set our view from the "main" layout resource
              SetContentView(Resource.Layout.Main);
              XmlDocument doc = new XmlDocument();
              doc.LoadXml("Q317664.xml");
              // var doc = XDocument.Load("Q317664.xml");
  
              // Get our button from the layout resource,
              // and attach an event to it
              Button button = FindViewById&lt;Button&gt;(Resource.Id.MyButton);
  
              button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
          }
      }
  }
  </code></pre>