Documentation for this section has not yet been entered.
The XmlSchemaObjectCollection.Add(XmlSchemaObject) method expects only System.Xml.Schema.XmlSchemaExternal and its derived types (System.Xml.Schema.XmlSchemaImport, System.Xml.Schema.XmlSchemaInclude, and System.Xml.Schema.XmlSchemaRedefine) as parameters. The following example illustrates adding an included schema to the XmlSchema.Includes collection of an existing System.Xml.Schema.XmlSchema object.
Example
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);
Example
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);