title: C# does XPathDocument(Path) evaluate the whole path before returning the document?
body: <p>my English is not he best, but it will work I think.
  Also I'm an absolut newcomer to C#.</p>
  
  <p>Given is the following code snippet:
  It has to open an XML-document, from which I KNOW that one of the nodes can be missintepreted, btw is really wrong.</p>
  
  <hr>
  
  <pre><code>try          
  {
      XPathDocument expressionLib = new XPathDocument(path);
      XPathNavigator xnav = expressionLib.CreateNavigator();
  }
  </code></pre>
  
  <p>...and so on</p>
  
  <hr>
  
  <p>my intention is to create the XPathDocument  and the XPathNavigator and THEN watch out for the errors.</p>
  
  <p>but my code Fails with "XPathDocument expressionLib = new XPathDocument(path);" (well, it raises an expception which I catch) so I assume that "XPathDocument(path);" validates the whole XML-document before returning it.</p>
  
  <p>At Microsoft pages I didn't find any hints for that assumed behavior - can you verify it?</p>
  
  <p>And, what could be the workaround?</p>
  
  <p>Yes, I WANT open that XML with that error inside (not at the topmost node) and react just for that invalid node and work with the rest of the file.</p>
  
  <p>Enjoy Weekend
  Alex.</p>