i wrote a function (see below), but i am not sure as this will be the exact replica of what it's suppose to do.
Create (new Xml Text Reader(file), settings); Check the MSDN documentation for Xml Validating Reader and you'll see in the [Obsolete Attribute] attribute this: "Use Xml Reader created by Xml Reader.
For example, the reported node type may be different than the actual node type of the current node.
The Validation Type property specifies what type of validation the reader should perform. After an exception is thrown the state of the reader is not predictable.
NET Framework 2.0, we recommend that you use the Xml Reader Settings class and the Create method to create a validating XML reader. Note The Xml Validating Reader class is obsolete in . You can create a validating Xml Reader instance by using the Xml Reader Settings class and the Create method.
Create() method using appropriate Xml Reader Settings instead. linkid=14202")] public class Xml Validating Reader : System. Use the Read State property to check whether a reader is in error state.