XmlSchema.Includes Propriété

Définition

Obtient la collection de schémas inclus et importés.

public:
 property System::Xml::Schema::XmlSchemaObjectCollection ^ Includes { System::Xml::Schema::XmlSchemaObjectCollection ^ get(); };
public System.Xml.Schema.XmlSchemaObjectCollection Includes { get; }
member this.Includes : System.Xml.Schema.XmlSchemaObjectCollection
Public ReadOnly Property Includes As XmlSchemaObjectCollection

Valeur de propriété

XmlSchemaObjectCollection

XmlSchemaObjectCollection des schémas inclus et importés.

Remarques

La Add méthode s’attend uniquement XmlSchemaExternal et ses types dérivés (XmlSchemaImportet XmlSchemaRedefineXmlSchemaInclude) en tant que paramètres. L’exemple suivant illustre l’ajout d’un schéma inclus à la Includes collection d’un objet existant XmlSchema .

Dim schema As XmlSchema = New XmlSchema()  

Dim textReader As XmlTextReader = New XmlTextReader("include.xsd")  
Dim includeSchema As XmlSchema = XmlSchema.Read(textReader, null)  

Dim include As XmlSchemaInclude = New XmlSchemaInclude()  
include.Schema = includeSchema;  
schema.Includes.Add(include);  
XmlSchema schema = new XmlSchema();  

XmlTextReader textReader = new XmlTextReader("include.xsd");  
XmlSchema includeSchema = XmlSchema.Read(textReader, null);  

XmlSchemaInclude include = new XmlSchemaInclude();  
include.Schema = includeSchema;  
schema.Includes.Add(include);  

S’applique à