XmlReader.Create (XmlReader, XmlReaderSettings) creates XmlReader with XmlReader and XmlReaderSettings
using System;
using System.IO;
using System.Xml;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
publicclass MainClass
{
publicstaticvoid Main()
{
XmlDocument doc = new XmlDocument();
doc.Load("books.xml");
XmlNodeReader nodeReader = new XmlNodeReader(doc);
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
settings.Schemas.Add("urn:bookstore-schema", "books.xsd");
XmlReader reader = XmlReader.Create(nodeReader, settings);
while (reader.Read()) ;
}
}