System.Xml.Schema.XmlSchemaSet.Schemas Method

Returns a collection of all the XML Schema definition language (XSD) schemas in the System.Xml.Schema.XmlSchemaSet that belong to the given namespace.

Syntax

public ICollection Schemas (string targetNamespace)

Parameters

targetNamespace
The schema targetNamespace property.

Returns

An ICollection object containing all the schemas that have been added to the System.Xml.Schema.XmlSchemaSet that belong to the given namespace. If no schemas have been added to the System.Xml.Schema.XmlSchemaSet, an empty ICollection object is returned.

Remarks

If the targetNamespace parameter is null or string.Empty, then all schemas without a namespace are returned.

This method returns schemas that were added indirectly to the System.Xml.Schema.XmlSchemaSet because they were imported.

Note:

The XmlSchemaSet.Schemas(string) method is the equivalent of the XmlSchemaCollection.Item(string) method of the obsolete System.Xml.Schema.XmlSchemaCollection.

Requirements

Namespace: System.Xml.Schema
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0