Adds the System.Xml.Schema.XmlSchema to the collection. The specified System.Xml.XmlResolver is used to resolve any external references.
- schema
- The XmlSchema to add to the collection.
- resolver
- The System.Xml.XmlResolver used to resolve namespaces referenced in include and import elements. If this is null, external references are not resolved.
The XmlSchema added to the schema collection.
The targetNamespace attribute is used to identify this schema.
If the schema contains include and import elements that reference other namespaces, the schemas for these other namespaces are loaded for validation purposes only. Unlike the original schema, these other schemas are not explicitly added to the schema collection. As a result, they are not accessible using any of the collection methods or properties.
The System.Xml.Schema.XmlSchemaCollection class is obsolete in the .NET Framework version 2.0 and has been replaced by the System.Xml.Schema.XmlSchemaSet class.