XmlSchema.Compile : XmlSchema « System.Xml.Schema « C# / C Sharp by API






XmlSchema.Compile

  
using System;
using System.IO;
using System.Xml.Schema;

public class ValidateSchema {
  public static void Main(string [] args) {
    ValidationEventHandler handler = new ValidationEventHandler(ValidateSchema.Handler);
    XmlSchema schema = XmlSchema.Read(File.OpenRead(args[0]),handler);
    schema.Compile(handler);
  }

  public static void Handler(object sender, ValidationEventArgs e) {
    Console.WriteLine(e.Message);
  }
}

   
    
  








Related examples in the same category

1.XmlSchema.Write