XmlReaderSettings.IgnoreProcessingInstructions Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy ignorować instrukcje przetwarzania.

public:
 property bool IgnoreProcessingInstructions { bool get(); void set(bool value); };
public bool IgnoreProcessingInstructions { get; set; }
member this.IgnoreProcessingInstructions : bool with get, set
Public Property IgnoreProcessingInstructions As Boolean

Wartość właściwości

true ignorować instrukcje przetwarzania; w przeciwnym razie false. Wartość domyślna to false.

Przykłady

Poniżej przedstawiono sposób tworzenia 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

Ustawienie tej właściwości może spowodować true zwrócenie przez czytnik wielu ciągłych węzłów tekstowych. Nie ma to wpływu na walidację.

Dotyczy

Zobacz też