title: "Data at the root level is invalid. Line 1, position 1" When Parsing XML
body: <p>I am wanting to parse the following xml to get richTextBox1 so show 'John Smith', '35', 'Jpeg'.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
  - &lt;Games&gt;
  - &lt;Gamer Name="John Smith" Age="35" Win%="5.33502797236373"&gt;
     &lt;Picture-id&gt;Jpeg&lt;/Picture-id&gt; 
     &lt;Game&gt;300&lt;/Game&gt; 
    &lt;/Gamer&gt;
  &lt;/Games&gt;
  </code></pre>
  
  <p>I have used the following code to try and do this -</p>
  
  <pre><code>StringBuilder output = new StringBuilder();
  
  String xmlString = @"Gamer.xml";
  
  // Create an XmlReader
  using (XmlReader reader = XmlReader.Create(new StringReader(xmlString)))
  {
      reader.ReadToFollowing("Gamer");
      reader.MoveToFirstAttribute();
      string genre = reader.Value;
      output.AppendLine("Name" + "Age");
  
      reader.ReadToFollowing("Picture-id");
      output.AppendLine(reader.ReadElementContentAsString());
  }
  
  richTextBox1.Text = output.ToString();
  </code></pre>
  
  <p>For some reason when I execute it brings back the error -
  'Data at the root level is invalid. Line 1, position 1.' How can I get this to work, any input is greatly appreciated.</p>