Прочетете на английски Редактиране

Споделяне чрез


XmlSchema.Read Method

Definition

Reads an XML Schema.

Overloads

Read(Stream, ValidationEventHandler)

Reads an XML Schema from the supplied stream.

Read(TextReader, ValidationEventHandler)

Reads an XML Schema from the supplied TextReader.

Read(XmlReader, ValidationEventHandler)

Reads an XML Schema from the supplied XmlReader.

Read(Stream, ValidationEventHandler)

Source:
XmlSchema.cs
Source:
XmlSchema.cs
Source:
XmlSchema.cs

Reads an XML Schema from the supplied stream.

C#
public static System.Xml.Schema.XmlSchema? Read(System.IO.Stream stream, System.Xml.Schema.ValidationEventHandler? validationEventHandler);
C#
public static System.Xml.Schema.XmlSchema Read(System.IO.Stream stream, System.Xml.Schema.ValidationEventHandler validationEventHandler);

Parameters

stream
Stream

The supplied data stream.

validationEventHandler
ValidationEventHandler

The validation event handler that receives information about XML Schema syntax errors.

Returns

The XmlSchema object representing the XML Schema.

Exceptions

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Read(TextReader, ValidationEventHandler)

Source:
XmlSchema.cs
Source:
XmlSchema.cs
Source:
XmlSchema.cs

Reads an XML Schema from the supplied TextReader.

C#
public static System.Xml.Schema.XmlSchema? Read(System.IO.TextReader reader, System.Xml.Schema.ValidationEventHandler? validationEventHandler);
C#
public static System.Xml.Schema.XmlSchema Read(System.IO.TextReader reader, System.Xml.Schema.ValidationEventHandler validationEventHandler);

Parameters

reader
TextReader

The TextReader containing the XML Schema to read.

validationEventHandler
ValidationEventHandler

The validation event handler that receives information about the XML Schema syntax errors.

Returns

The XmlSchema object representing the XML Schema.

Exceptions

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Read(XmlReader, ValidationEventHandler)

Source:
XmlSchema.cs
Source:
XmlSchema.cs
Source:
XmlSchema.cs

Reads an XML Schema from the supplied XmlReader.

C#
public static System.Xml.Schema.XmlSchema? Read(System.Xml.XmlReader reader, System.Xml.Schema.ValidationEventHandler? validationEventHandler);
C#
public static System.Xml.Schema.XmlSchema Read(System.Xml.XmlReader reader, System.Xml.Schema.ValidationEventHandler validationEventHandler);

Parameters

reader
XmlReader

The XmlReader containing the XML Schema to read.

validationEventHandler
ValidationEventHandler

The validation event handler that receives information about the XML Schema syntax errors.

Returns

The XmlSchema object representing the XML Schema.

Exceptions

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1