XmlSchema.Includes 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取包含的和导入的架构的集合。
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。
注解
该方法 Add 仅 XmlSchemaExternal 需要其派生类型 (XmlSchemaImport, XmlSchemaInclude) 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);