XmlReaderSettings Costruttori

Definizione

Inizializza una nuova istanza della classe XmlReaderSettings.

Overload

XmlReaderSettings()

Inizializza una nuova istanza della classe XmlReaderSettings.

XmlReaderSettings(XmlResolver)
Obsoleti.

Inizializza una nuova istanza della classe XmlReaderSettings.

XmlReaderSettings()

Source:
XmlReaderSettings.cs
Source:
XmlReaderSettings.cs
Source:
XmlReaderSettings.cs

Inizializza una nuova istanza della classe XmlReaderSettings.

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

Esempio

Di seguito viene creato un oggetto impostazioni che può essere utilizzato per costruire un lettore che rimuove istruzioni di elaborazione, commenti e spazi vuoti non significativi.

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

Commenti

Nella tabella seguente vengono illustrati i valori iniziali delle proprietà per un'istanza di XmlReaderSettings.

Proprietà Valore iniziale
Async false.
CheckCharacters true.
ConformanceLevel Document.
IgnoreComments false.
IgnoreProcessingInstructions false.
IgnoreWhitespace false.
LineNumberOffset 0.
LinePositionOffset 0.
MaxCharactersFromEntities 0 (non esiste alcun limite al numero di caratteri risultanti dall'espansione delle entità).
MaxCharactersInDocument 0 (non esiste alcun limite per le dimensioni del documento XML).
NameTable null.
DtdProcessing Prohibit
ProhibitDtd true. Questa proprietà è obsoleta. In alternativa, utilizzare DtdProcessing. Se è stato impostato ProhibitDtd sul valore true predefinito impostato su DtdProcessingProhibit. Se è stato impostato su ProhibitDtdDtdProcessingfalseParse.
Schemas Oggetto XmlSchemaSet vuoto.
ValidationFlags ProcessIdentityConstraints.
ValidationType None.
XmlResolver Nuovo oggetto XmlUrlResolver.

Vedi anche

Si applica a

XmlReaderSettings(XmlResolver)

Attenzione

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

Inizializza una nuova istanza della classe 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)

Parametri

resolver
XmlResolver

Resolver XML.

Attributi

Vedi anche

Si applica a