private void Form1_Load(object sender, System.EventArgs e) { const string schemaPath = @"c:\AddressBook.xsd"; const string documentPath = @"c:\sample001.xml"; XmlDocument doc = new XmlDocument(); XmlValidatingReader reader = new XmlValidatingReader( new XmlTextReader( documentPath ) ); reader.Schemas.Add( null, schemaPath ); reader.ValidationType = ValidationType.Schema; doc.Load( reader ); }