using System; using System.Xml; using System.Xml.Schema; public class XML5{ public static void Main(){ XmlDocument doc=new XmlDocument(); doc.Load("inimesed.xml"); doc.Schemas.Add(null, "inimesed1.xsd"); ValidationEventHandler veh=new ValidationEventHandler(veahaldaja); doc.Validate(veh); } public static void veahaldaja(object allikas, ValidationEventArgs e){ Console.WriteLine("{0} {1}", e.Message, e.Exception.LineNumber); } }