Sdílet prostřednictvím


XmlSchema.Includes Vlastnost

Definice

Získá kolekci zahrnutých a importovaných schémat.

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

Hodnota vlastnosti

Zahrnutá XmlSchemaObjectCollection a importovaná schémata

Poznámky

Metoda Add očekává pouze XmlSchemaExternal a jeho odvozené typy (XmlSchemaImport, XmlSchemaIncludea XmlSchemaRedefine) jako parametry. Následující příklad ukazuje přidání zahrnutého schématu Includes do kolekce existujícího XmlSchema objektu.

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

Platí pro