Partilhar via


XmlReaderSettings.IgnoreProcessingInstructions Propriedade

Definição

Obtém ou define um valor que indica se as instruções de processamento devem ser ignoradas.

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

Valor da propriedade

Boolean

true para ignorar as instruções de processamento; caso contrário, false. O padrão é false.

Exemplos

O seguinte cria um objeto de configurações que pode ser usado para construir um leitor que tira instruções de processamento, comentários e espaço em branco insignificante.

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

Comentários

A configuração dessa propriedade true pode resultar no retorno de vários nós de texto contíguos do leitor. Isso não afeta a validação.

Aplica-se a

Confira também