XmlSchema.Includes 属性

定义

获取包含的和导入的架构的集合。

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

属性值

XmlSchemaObjectCollection

包含的和导入的架构的 XmlSchemaObjectCollection

注解

该方法 AddXmlSchemaExternal 需要其派生类型 (XmlSchemaImportXmlSchemaInclude) XmlSchemaRedefine 作为参数。 以下示例演示如何将包含的架构添加到 Includes 现有 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);  

适用于