Bagikan melalui


XmlReaderSettings Konstruktor

Definisi

Menginisialisasi instans baru kelas XmlReaderSettings.

Overload

XmlReaderSettings()

Menginisialisasi instans baru kelas XmlReaderSettings.

XmlReaderSettings(XmlResolver)
Kedaluwarsa.

Menginisialisasi instans baru kelas XmlReaderSettings.

XmlReaderSettings()

Sumber:
XmlReaderSettings.cs
Sumber:
XmlReaderSettings.cs
Sumber:
XmlReaderSettings.cs

Menginisialisasi instans baru kelas XmlReaderSettings.

public:
 XmlReaderSettings();
public XmlReaderSettings ();
Public Sub New ()

Contoh

Berikut ini membuat objek pengaturan yang dapat digunakan untuk membangun pembaca yang menghapus instruksi pemrosesan, komentar, dan ruang putih yang tidak signifikan.

// Set the reader settings.
XmlReaderSettings^ settings = gcnew XmlReaderSettings;
settings->IgnoreComments = true;
settings->IgnoreProcessingInstructions = true;
settings->IgnoreWhitespace = true;
// Set the reader settings.
XmlReaderSettings settings = new XmlReaderSettings();
settings.IgnoreComments = true;
settings.IgnoreProcessingInstructions = true;
settings.IgnoreWhitespace = true;
' Set the reader settings.
Dim settings as XmlReaderSettings = new XmlReaderSettings()
settings.IgnoreComments = true
settings.IgnoreProcessingInstructions = true
settings.IgnoreWhitespace = true

Keterangan

Tabel berikut ini memperlihatkan nilai properti awal untuk instans XmlReaderSettings.

Harta benda Nilai awal
Async false.
CheckCharacters true.
CloseInput false.
ConformanceLevel Document.
DtdProcessing Prohibit
IgnoreComments false.
IgnoreProcessingInstructions false.
IgnoreWhitespace false.
LineNumberOffset 0.
LinePositionOffset 0.
MaxCharactersFromEntities 0 (tidak ada batasan jumlah karakter yang dihasilkan dari memperluas entitas).
MaxCharactersInDocument 0 (tidak ada batasan ukuran dokumen XML).
NameTable null.
ProhibitDtd true. Properti ini sudah usang. Gunakan DtdProcessing sebagai gantinya. Jika Anda telah mengatur ProhibitDtd ke nilai defaultnya true mengatur DtdProcessing ke Prohibit. Jika Anda telah mengatur ProhibitDtd ke false mengatur DtdProcessing ke Parse.
Schemas Objek XmlSchemaSet kosong.
ValidationFlags ProcessIdentityConstraints.
ValidationType None.
XmlResolver Objek XmlUrlResolver baru.

Lihat juga

Berlaku untuk

XmlReaderSettings(XmlResolver)

Perhatian

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Menginisialisasi instans baru kelas XmlReaderSettings.

public:
 XmlReaderSettings(System::Xml::XmlResolver ^ resolver);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public XmlReaderSettings (System.Xml.XmlResolver resolver);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
new System.Xml.XmlReaderSettings : System.Xml.XmlResolver -> System.Xml.XmlReaderSettings
Public Sub New (resolver As XmlResolver)

Parameter

resolver
XmlResolver

Pemecah masalah XML.

Atribut

Lihat juga

Berlaku untuk