XmlReaderSettings.IgnoreComments 속성

정의

주석을 무시할지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

true 주석을 무시하려면 그렇지 않으면 false. 기본값은 false입니다.

예제

다음은 처리 명령, 주석 및 중요하지 않은 공백을 제거하는 판독기를 생성하는 데 사용할 수 있는 설정 개체를 만듭니다.

// 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 에서 여러 연속 텍스트 노드가 반환될 수 있습니다. 유효성 검사에는 영향을 주지 않습니다.

적용 대상

추가 정보