title: What is a good replacement for the obsolete XmlValidatingReader class?
body: <p>When I try to create an application with C# these method gave warning to me</p>
  
  <pre><code>        //get validator
          XmlValidatingReader xmlValidator = new XmlValidatingReader(new FileStream(xmlfile,FileMode.Open), XmlNodeType.Document,psContext);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>        //compile to load schema elements
          schema.Compile(new ValidationEventHandler(ValidationCallback));
  </code></pre>
  
  <p>I use VS 2008 with .NET Framework 3.5 to implemented this.</p>
  
  <p>Please give me the correct way to do this.</p>