Modifier

Partager via


XmlReaderSettings.IgnoreProcessingInstructions Property

Definition

Gets or sets a value indicating whether to ignore processing instructions.

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

Property Value

true to ignore processing instructions; otherwise false. The default is false.

Examples

The following creates a settings object that can be used to construct a reader that strips processing instructions, comments, and insignificant white space.

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

Remarks

Setting this property to true can result in multiple contiguous text nodes being returned from the reader. This does not affect validation.

Applies to

See also