XmlSchemaSet.Schemas 메서드

정의

XmlSchemaSet에 포함된 XSD(XML 스키마 정의 언어) 스키마의 컬렉션을 반환합니다.

오버로드

Schemas()

XmlSchemaSet에 포함된 모든 XSD(XML 스키마 정의 언어) 스키마의 컬렉션을 반환합니다.

Schemas(String)

XmlSchemaSet에서 지정된 네임스페이스에 속하는 모든 XSD(XML 스키마 정의 언어) 스키마의 컬렉션을 반환합니다.

Schemas()

Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs

XmlSchemaSet에 포함된 모든 XSD(XML 스키마 정의 언어) 스키마의 컬렉션을 반환합니다.

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 에 추가한 스키마를 반환합니다.

참고

메서드는 Schemas 사용되지 않는 XmlSchemaCollectionGetEnumerator 메서드와 동일합니다.

적용 대상

Schemas(String)

Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs
Source:
XmlSchemaSet.cs

XmlSchemaSet에서 지정된 네임스페이스에 속하는 모든 XSD(XML 스키마 정의 언어) 스키마의 컬렉션을 반환합니다.

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 개체가 반환됩니다.

예제

다음 예제에서는 의 네임스페XmlSchemaSet이스에 있는 모든 스키마를 반복하는 http://www.contoso.com/books 방법을 보여 줍니다.

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

설명

매개 변수가 targetNamespacenull 또는 Empty이면 네임스페이스가 없는 모든 스키마가 반환됩니다.

이 메서드는 가져온 스키마를 간접적으로 XmlSchemaSet 에 추가한 스키마를 반환합니다.

참고

메서드는 Schemas 사용되지 않는 XmlSchemaCollectionItem[] 메서드와 동일합니다.

적용 대상