title: XML Deserialization {"Root element is missing."} Error
body: <p>I'm adding a new project to my Solution, and have added the code posted below. The LoadXML() method, variable setup, and file deserialization is done exactly as I have done it several other times throughout this Solution, but suddenly now for this part it is throwing this annoying "{"Root element is missing."}" error - even when there is no XML present or when I use a different XML I know works. This means to me that the bug is obviously in the code, but since the code is almost carbon-copied from my previous file transfers, I don't know how that could be either. The other situations for this error previously posted on this website do not really conform to my situation, so I started a fresh one in hopes I might land closer to an answer!</p>
  
  <pre><code>    //fileName and XML variables for serialization/deserialization
      const string fileName = "SimulatedTrain1.xml";
      XmlSerializer xml = new XmlSerializer(typeof(BindingList&lt;SimulatedTrain&gt;));
  
      //Create BindingList object to hold XML data
      public BindingList&lt;SimulatedTrain&gt; SimulatedTrain = new BindingList&lt;SimulatedTrain&gt;();
  
      public void LoadXML()
      {
          try
          {
              using (var fs = new FileStream(fileName, FileMode.OpenOrCreate))
              {
                  var tempTrain = (BindingList&lt;SimulatedTrain&gt;)xml.Deserialize(fs);
                  SimulatedTrain = tempTrain;
              }                
          }
          catch (Exception ex)
          {
              Console.WriteLine(ex.Message, ex);
          }
      }
  </code></pre>
  
  <p>The LoadXML() gets called on the form_load</p>
  
  <p>Edit: Here's a part of my XML file (the rest is basically repeat data)</p>
  
  <p><a href="https://i.stack.imgur.com/zcJAo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zcJAo.png" alt="enter image description here"></a></p>