title: nbsp issue reading XML
body: <p>There are several posts on this issue but none of the solutions seem to work for me. Not sure what I'm doing wrong. 
  I'm trying to read an XML file that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;content languageCode="en" languageID="1"&gt;
    &lt;ftypeparser&gt;c:\users\pdeoliveira\Documents\Xmlparsernew.xml&lt;/ftypeparser&gt;
    &lt;xmlparser&gt;c:\users\pdeoliveira\Documents\Xmlparser.xml&lt;/xmlparser&gt;
    &lt;sourcelocation&gt;c:\localization\2015&lt;/sourcelocation&gt;
    &lt;rpkfile&gt;RPK_DefaultSyllabi_2015.xml&lt;/rpkfile&gt;
    &lt;loglocation&gt;c:\users\pdeoliveira\Documents\Buildloc_Log.txt&lt;/loglocation&gt;
    &lt;losefiles&gt;&lt;locfile&gt;c:\localization\2015\Strings.xml&lt;/locfile&gt;&lt;/losefiles&gt;
  &lt;/content&gt;
  </code></pre>
  
  <p>Here's the code that reads it: </p>
  
  <pre><code>        XmlDocument doc = new XmlDocument();
          string filetoload = "config.xml";
              try
              {
                  doc.Load(filetoload);
              }
              catch (Exception e)
              {
               Console.Writeline(e);
              }
  </code></pre>
  
  <p>And here's the exception I get: </p>
  
  <pre><code>System.Xml.XmlException: Reference to undeclared entity 'nbsp'. Line 1960, position 12.
      at System.Xml.XmlTextReaderImpl.Throw(Exception e)
      at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String name,       Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver, Int32  entityStartLinePos)
      at System.Xml.XmlTextReaderImpl.ResolveEntity()
      at System.Xml.XmlLoader.LoadEntityReferenceNode(Boolean direct)
      at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
      at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
      at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
      at System.Xml.XmlDocument.Load(XmlReader reader)
      at System.Xml.XmlDocument.Load(String filename)
      at ConsoleApplication9.Program.getrestype(String fname) in  c:\Users\pdeoliveira\Documents\Visual Studio  2013\Projects\BuildLoc\BuildLoc\Program.cs:line 1067
  </code></pre>
  
  <p>I tried using the declaration for nbsp like suggested in other posts: </p>
  
  <pre><code>&lt;!DOCTYPE doctypeName [
     &lt;!ENTITY nbsp "&amp;#160;"&gt;
  ]&gt;
  </code></pre>
  
  <p>That didn't work either. The interesting thing is that my file is only 10 or so lines long and it points to an issue on line 1960...??
  Any help would be appreciated. </p>