Validate Schema : Schema : XML C# Source Code


Custom Search

C# Source Code » XML » Schema »

 

Validate Schema








    

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);
  }
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo XML
» Schema