title: DTD validation in C#
body: <p>I have an XML file with the following DOCTYPE:</p>
  
  <pre><code>&lt;!DOCTYPE localdtd PUBLIC "-//local host//local dtd - XML//EN" "localdtd.dtd"[]&gt;
  </code></pre>
  
  <p>I am trying to validate the XML against localdtd.dtd which is residing on my root folder using following code</p>
  
  <pre><code>XmlDocument xml = new XmlDocument();
  
  using (var xmlreader = XmlReader.Create(
                            new StringReader(xmlcontent), 
                            new XmlReaderSettings() 
                            { 
                               ProhibitDtd = false, ValidationType = ValidationType.DTD
                            }   ) )
  {
              xml.Load(xmlreader); 
  } 
  </code></pre>
  
  <p>I am getting the following error</p>
  
  <p>Could not find file 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\localdtd.dtd'.</p>
  
  <p>Can we specify the location of localdtd.dtd file?</p>