XmlReaderSettings Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy XmlReaderSettings.

Przeciążenia

XmlReaderSettings()

Inicjuje nowe wystąpienie klasy XmlReaderSettings.

XmlReaderSettings(XmlResolver)
Nieaktualne.

Inicjuje nowe wystąpienie klasy XmlReaderSettings.

XmlReaderSettings()

Inicjuje nowe wystąpienie klasy XmlReaderSettings.

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

Przykłady

Poniżej przedstawiono tworzenie obiektu ustawień, który może służyć do konstruowania czytnika, który usuwa instrukcje przetwarzania, komentarze i nieistotne odstępy.

// 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

Uwagi

W poniższej tabeli przedstawiono początkowe wartości właściwości dla wystąpienia klasy XmlReaderSettings.

Właściwość Wartość początkowa
Async false.
CheckCharacters true.
ConformanceLevel Document.
IgnoreComments false.
IgnoreProcessingInstructions false.
IgnoreWhitespace false.
LineNumberOffset 0.
LinePositionOffset 0.
MaxCharactersFromEntities 0 (nie ma limitu liczby znaków, które wynikają z rozszerzania jednostek).
MaxCharactersInDocument 0 (nie ma limitu rozmiaru dokumentu XML).
NameTable null.
DtdProcessing Prohibit
ProhibitDtd true. Ta właściwość jest przestarzała. Zamiast tego użyj polecenia cmdlet DtdProcessing. Jeśli ustawiono ProhibitDtd jej wartość true domyślną na DtdProcessing Prohibitwartość . Jeśli ustawiono opcję ProhibitDtd false na DtdProcessing Parsewartość .
Schemas Pusty XmlSchemaSet obiekt.
ValidationFlags ProcessIdentityConstraints.
ValidationType None.
XmlResolver Nowy XmlUrlResolver obiekt.

Zobacz też

Dotyczy

XmlReaderSettings(XmlResolver)

Przestroga

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

Inicjuje nowe wystąpienie klasy 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)

Parametry

resolver
XmlResolver

Rozpoznawanie kodu XML.

Atrybuty

Zobacz też

Dotyczy