XmlReaderSettings.IgnoreProcessingInstructions Свойство

Определение

Возвращает или задает значение, указывающее, следует ли игнорировать инструкции по обработке.

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

Значение свойства

true — игнорировать инструкции обработки; в противном случае false. Значение по умолчанию — false.

Примеры

Ниже создается объект параметров, который можно использовать для создания средства чтения, которое удаляет инструкции по обработке, комментарии и незначительные пробелы.

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

Комментарии

Задание этому свойству значения true может привести к возврату нескольких смежных текстовых узлов из средства чтения. Это не влияет на проверку.

Применяется к

См. также раздел