title: System.XML.XmlException: ' ' is an unexpected token. The expected token is ';'
body: <p>I have an HTML form that i'm trying to load using XDocument.Load, and i'm receiving the following error:</p>
  
  <pre><code>' ' is an unexpected token. The expected token is ';'. Line 1257, position 66.
     at System.Xml.XmlTextReaderImpl.Throw(Exception e)
  </code></pre>
  
  <p>The code is just calling the following:</p>
  
  <pre><code>XDocument xmlDoc = XDocument.Load(pageData.Stream);
  </code></pre>
  
  <p>pageData is a custom object from another system, that is spitting out a datastream. I've had it export the xml back out to a string, and it looks fine.</p>
  
  <p>When i check that line on the HTML, it's just a closing tag for an element. How reliable is the line/position given by the xml exception? I'm just dumping the source of the form into notepad++ for validation, and i can't see that it would be an issue.</p>
  
  <p>EDIT:
  The following is the first few lines before and after the error. I've marked the error line.</p>
  
  <pre><code>                                        &lt;/p&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
  
              &lt;/td&gt;
          &lt;/tr&gt;  &lt;----Error Line
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;div id="BusinessJustificationForm"&gt;
                      &lt;table id="BusinessJustificationTable"&gt;
                          &lt;tr&gt;
                              &lt;td class="seperator" colspan="7"&gt;
  </code></pre>