XmlSchemaCollection.Item プロパティ
アセンブリ: System.Xml (system.xml.dll 内)

プロパティ値
名前空間 URI に関連付けられている XmlSchema。指定した名前空間に関連付けられているスキーマが読み込まれていないか、名前空間が XDR スキーマに関連付けられている場合は null 参照 (Visual Basic では Nothing)。

![]() |
---|
XmlSchemaCollection クラスは .NET Framework Version 2.0 では使用されなくなり、XmlSchemaSet クラスに置き換えられました。 |

スキーマがコレクション内に存在するかどうかを確認する例を次に示します。コレクション内に存在する場合は、そのスキーマを表示します。
If xsc.Contains("urn:bookstore-schema") Then Dim schema As XmlSchema = xsc("urn:bookstore-schema") Dim sw As New StringWriter() Dim xmlWriter As New XmlTextWriter(sw) xmlWriter.Formatting = Formatting.Indented xmlWriter.Indentation = 2 schema.Write(xmlWriter) Console.WriteLine(sw.ToString()) End If
if (xsc.Contains("urn:bookstore-schema")) { XmlSchema schema = xsc["urn:bookstore-schema"]; StringWriter sw = new StringWriter(); XmlTextWriter xmlWriter = new XmlTextWriter(sw); xmlWriter.Formatting = Formatting.Indented; xmlWriter.Indentation = 2; schema.Write(xmlWriter); Console.WriteLine(sw.ToString()); }
if ( xsc->Contains( "urn:bookstore-schema" ) ) { XmlSchema^ schema = xsc[ "urn:bookstore-schema" ]; StringWriter^ sw = gcnew StringWriter; XmlTextWriter^ xmlWriter = gcnew XmlTextWriter( sw ); xmlWriter->Formatting = Formatting::Indented; xmlWriter->Indentation = 2; schema->Write( xmlWriter ); Console::WriteLine( sw ); }
if (xSC.Contains("urn:bookstore-schema")) { XmlSchema schema = xSC.get_Item("urn:bookstore-schema"); StringWriter sW = new StringWriter(); XmlTextWriter xmlWriter = new XmlTextWriter(sW); xmlWriter.set_Formatting(Formatting.Indented); xmlWriter.set_Indentation(2); schema.Write(xmlWriter); Console.WriteLine(sW.ToString()); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からXmlSchemaCollection.Item プロパティを検索する場合は、下記のリンクをクリックしてください。

- XmlSchemaCollection.Item プロパティのページへのリンク