XmlSchemaCollectionEnumerator.Current Property
.NET Framework 4.5
Gets the current XmlSchema in the collection.
Namespace: System.Xml.Schema
Assembly: System.Xml (in System.Xml.dll)
The following example displays each of the XML Schema definition language (XSD) schemas in the schema collection.
public void DisplaySchemas(XmlSchemaCollection xsc) { XmlSchemaCollectionEnumerator ienum = xsc.GetEnumerator(); while (ienum.MoveNext()) { XmlSchema schema = ienum.Current; StringWriter sw = new StringWriter(); XmlTextWriter writer = new XmlTextWriter(sw); writer.Formatting = Formatting.Indented; writer.Indentation = 2; schema.Write(writer); Console.WriteLine(sw.ToString()); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.