XmlSchema.Read 方法

定義

讀取 XML 結構描述。

多載

Read(Stream, ValidationEventHandler)

從提供的資料流程讀取 XML 架構。

Read(TextReader, ValidationEventHandler)

從提供的 TextReader 讀取 XML 結構描述。

Read(XmlReader, ValidationEventHandler)

從提供的 XmlReader 讀取 XML 結構描述。

Read(Stream, ValidationEventHandler)

從提供的資料流程讀取 XML 架構。

public:
 static System::Xml::Schema::XmlSchema ^ Read(System::IO::Stream ^ stream, System::Xml::Schema::ValidationEventHandler ^ validationEventHandler);
public static System.Xml.Schema.XmlSchema? Read (System.IO.Stream stream, System.Xml.Schema.ValidationEventHandler? validationEventHandler);
public static System.Xml.Schema.XmlSchema Read (System.IO.Stream stream, System.Xml.Schema.ValidationEventHandler validationEventHandler);
static member Read : System.IO.Stream * System.Xml.Schema.ValidationEventHandler -> System.Xml.Schema.XmlSchema
Public Shared Function Read (stream As Stream, validationEventHandler As ValidationEventHandler) As XmlSchema

參數

stream
Stream

提供的資料流。

validationEventHandler
ValidationEventHandler

接收 XML 結構描述語法錯誤相關資訊的驗證事件處理常式。

傳回

XmlSchema

表示 XML 結構描述的 XmlSchema 物件。

例外狀況

適用於

Read(TextReader, ValidationEventHandler)

從提供的 TextReader 讀取 XML 結構描述。

public:
 static System::Xml::Schema::XmlSchema ^ Read(System::IO::TextReader ^ reader, System::Xml::Schema::ValidationEventHandler ^ validationEventHandler);
public static System.Xml.Schema.XmlSchema? Read (System.IO.TextReader reader, System.Xml.Schema.ValidationEventHandler? validationEventHandler);
public static System.Xml.Schema.XmlSchema Read (System.IO.TextReader reader, System.Xml.Schema.ValidationEventHandler validationEventHandler);
static member Read : System.IO.TextReader * System.Xml.Schema.ValidationEventHandler -> System.Xml.Schema.XmlSchema
Public Shared Function Read (reader As TextReader, validationEventHandler As ValidationEventHandler) As XmlSchema

參數

reader
TextReader

包含要讀取 XML 結構描述的 TextReader

validationEventHandler
ValidationEventHandler

接收 XML 結構描述語法錯誤相關資訊的驗證事件處理常式。

傳回

XmlSchema

表示 XML 結構描述的 XmlSchema 物件。

例外狀況

適用於

Read(XmlReader, ValidationEventHandler)

從提供的 XmlReader 讀取 XML 結構描述。

public:
 static System::Xml::Schema::XmlSchema ^ Read(System::Xml::XmlReader ^ reader, System::Xml::Schema::ValidationEventHandler ^ validationEventHandler);
public static System.Xml.Schema.XmlSchema? Read (System.Xml.XmlReader reader, System.Xml.Schema.ValidationEventHandler? validationEventHandler);
public static System.Xml.Schema.XmlSchema Read (System.Xml.XmlReader reader, System.Xml.Schema.ValidationEventHandler validationEventHandler);
static member Read : System.Xml.XmlReader * System.Xml.Schema.ValidationEventHandler -> System.Xml.Schema.XmlSchema
Public Shared Function Read (reader As XmlReader, validationEventHandler As ValidationEventHandler) As XmlSchema

參數

reader
XmlReader

包含要讀取 XML 結構描述的 XmlReader

validationEventHandler
ValidationEventHandler

接收 XML 結構描述語法錯誤相關資訊的驗證事件處理常式。

傳回

XmlSchema

表示 XML 結構描述的 XmlSchema 物件。

例外狀況

適用於