XmlSchemaSet.Schemas メソッド

定義

XmlSchemaSet内の XML スキーマ定義言語 (XSD) スキーマのコレクションを返します。

オーバーロード

名前 説明
Schemas()

XmlSchemaSet内のすべての XML スキーマ定義言語 (XSD) スキーマのコレクションを返します。

Schemas(String)

指定された名前空間に属する XmlSchemaSet 内のすべての XML スキーマ定義言語 (XSD) スキーマのコレクションを返します。

Schemas()

ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs

XmlSchemaSet内のすべての XML スキーマ定義言語 (XSD) スキーマのコレクションを返します。

public:
 System::Collections::ICollection ^ Schemas();
public System.Collections.ICollection Schemas();
member this.Schemas : unit -> System.Collections.ICollection
Public Function Schemas () As ICollection

返品

ICollectionに追加されたすべてのスキーマを含むXmlSchemaSet オブジェクト。 XmlSchemaSetにスキーマが追加されていない場合は、空のICollection オブジェクトが返されます。

次の例は、 XmlSchemaSet内のすべてのスキーマを反復処理する方法を示しています。

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd")

Dim schema As XmlSchema

For Each schema In schemaSet.Schemas()

    schema.Write(Console.Out)

Next
XmlSchemaSet schemaSet = new XmlSchemaSet();
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd");

foreach (XmlSchema schema in schemaSet.Schemas())
{
    schema.Write(Console.Out);
}

注釈

このメソッドは、インポートされたために XmlSchemaSet に間接的に追加されたスキーマを返します。

Note

Schemasメソッドは、古いGetEnumeratorXmlSchemaCollectionメソッドと同等です。

適用対象

Schemas(String)

ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs
ソース:
XmlSchemaSet.cs

指定された名前空間に属する XmlSchemaSet 内のすべての XML スキーマ定義言語 (XSD) スキーマのコレクションを返します。

public:
 System::Collections::ICollection ^ Schemas(System::String ^ targetNamespace);
public System.Collections.ICollection Schemas(string? targetNamespace);
public System.Collections.ICollection Schemas(string targetNamespace);
member this.Schemas : string -> System.Collections.ICollection
Public Function Schemas (targetNamespace As String) As ICollection

パラメーター

targetNamespace
String

スキーマ targetNamespace プロパティ。

返品

指定された名前空間に属するICollectionに追加されたすべてのスキーマを含むXmlSchemaSet オブジェクト。 XmlSchemaSetにスキーマが追加されていない場合は、空のICollection オブジェクトが返されます。

次の例は、http://www.contoso.com/books内の XmlSchemaSet 名前空間内のすべてのスキーマを反復処理する方法を示しています。

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd")

Dim schema As XmlSchema

For Each schema In schemaSet.Schemas("http://www.contoso.com/books")

    schema.Write(Console.Out)

Next
XmlSchemaSet schemaSet = new XmlSchemaSet();
schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd");

foreach (XmlSchema schema in schemaSet.Schemas("http://www.contoso.com/books"))
{
    schema.Write(Console.Out);
}

注釈

targetNamespace パラメーターがnullまたはEmptyの場合は、名前空間のないすべてのスキーマが返されます。

このメソッドは、インポートされたために XmlSchemaSet に間接的に追加されたスキーマを返します。

Note

Schemasメソッドは、古いItem[]XmlSchemaCollectionメソッドと同等です。

適用対象