DekGenius.com
[ Team LiB ] Previous Section Next Section

XmlSchemaSystem.Xml.Schema (system.xml.dll) CF 1.0  class 

public class XmlSchema : XmlSchemaObject {
// Public Constructors
   public XmlSchema( );  
// Public Static Fields
   public const string InstanceNamespace;                             // =http://www.w3.org/2001/XMLSchema-instance
   public const string Namespace;                                     // =http://www.w3.org/2001/XMLSchema
// Public Instance Properties
   public XmlSchemaForm AttributeFormDefault{set; get; } 
   public XmlSchemaObjectTable AttributeGroups{get; } 
   public XmlSchemaObjectTable Attributes{get; } 
   public XmlSchemaDerivationMethod BlockDefault{set; get; } 
   public XmlSchemaForm ElementFormDefault{set; get; } 
   public XmlSchemaObjectTable Elements{get; } 
   public XmlSchemaDerivationMethod FinalDefault{set; get; } 
   public XmlSchemaObjectTable Groups{get; } 
   public string Id{set; get; } 
   public XmlSchemaObjectCollection Includes{get; } 
   public bool IsCompiled{get; } 
   public XmlSchemaObjectCollection Items{get; } 
   public XmlSchemaObjectTable Notations{get; } 
   public XmlSchemaObjectTable SchemaTypes{get; } 
   public string TargetNamespace{set; get; } 
   public XmlAttribute[ ] UnhandledAttributes{set; get; } 
   public string Version{set; get; } 
// Public Static Methods
   public static XmlSchema Read( System.IO.Stream stream, ValidationEventHandler validationEventHandler);  
   public static XmlSchema Read( System.IO.TextReader reader, ValidationEventHandler validationEventHandler);  
   public static XmlSchema Read( System.Xml.XmlReader reader, ValidationEventHandler validationEventHandler);  
// Public Instance Methods
   public void Compile( ValidationEventHandler validationEventHandler);  
   public void Compile( ValidationEventHandler validationEventHandler, System.Xml.XmlResolver resolver);  
   public void Write( System.IO.Stream stream);  
   public void Write( System.IO.Stream stream, System.Xml.XmlNamespaceManager namespaceManager);  
   public void Write( System.IO.TextWriter writer);  
   public void Write( System.IO.TextWriter writer, System.Xml.XmlNamespaceManager namespaceManager);  
   public void Write( System.Xml.XmlWriter writer);  
   public void Write( System.Xml.XmlWriter writer, System.Xml.XmlNamespaceManager namespaceManager);  
}

The XmlSchema type is a subclass of XmlSchemaObject that represents the xs:schema element, and constitutes the top-level element of an instance of an XSD. Its staticRead( ) method returns an instance of XmlSchema with data from an XML document via a System.IO.Stream, System.IO.TextReader, or System.Xml.XmlReader, and reports errors in the XML Schema's structure via a ValidationEventHandler delegate instance. Its Write( ) method writes the instance data to a System.IO.Stream, System.IO.TextWriter, or System.Xml.XmlWriter.

The Compile( ) method compiles the XmlSchema instance into a collection of XmlSchemaObjects used for XML validation. Any syntactic or semantic errors in the XML Schema document are reported via a ValidationEventHandler delegate instance passed into the Compile( ) method. The XmlSchemaObjectTables that are the products of compilation may be accessed via the read-only AttributeGroups, Attributes, Elements, Groups, Notations, and SchemaTypes properties. The IsCompiled property indicates whether the instance has been compiled.

The Items property provides access to the XmlSchemaObjectCollection of XmlSchemaAnnotation, XmlSchemaAttribute, XmlSchemaAttributeGroup, XmlSchemaComplexType, XmlSchemaSimpleType, XmlSchemaElement, XmlSchemaGroup, and XmlSchemaNotation objects, which are the xs:schema element's child elements.

The AttributeFormDefault, BlockDefault, ElementFormDefault, FinalDefault, Id, TargetNamespace, and Version properties provide access to the attributes of the xs:schema element.

Hierarchy

System.Object XmlSchemaObject XmlSchema

    [ Team LiB ] Previous Section Next Section