NodeFilter Class

The constants of the NodeFilter callback interface (https://dom.spec.whatwg.org/#interface-nodefilter).

public static class NodeFilter

Constants

NameDescription
FilterAcceptThe node is accepted by the filter.
FilterRejectThe node and its descendants are rejected by the filter.
FilterSkipThe node is skipped by the filter, but its descendants are still considered.
ShowAllBit mask that shows all the node types.
ShowAttributeBit mask that shows Attr nodes.
ShowCDataSectionBit mask that shows CDATASection nodes.
ShowCommentBit mask that shows Comment nodes.
ShowDocumentBit mask that shows Document nodes.
ShowDocumentFragmentBit mask that shows DocumentFragment nodes.
ShowDocumentTypeBit mask that shows DocumentType nodes.
ShowElementBit mask that shows Element nodes.
ShowEntityBit mask for the legacy entity node type, which is never present in a tree.
ShowEntityReferenceBit mask for the legacy entity reference node type, which is never present in a tree.
ShowNotationBit mask for the legacy notation node type, which is never present in a tree.
ShowProcessingInstructionBit mask that shows ProcessingInstruction nodes.
ShowTextBit mask that shows Text nodes.

FilterAccept

The node is accepted by the filter.

public const ushort FilterAccept = 1

FilterReject

The node and its descendants are rejected by the filter.

public const ushort FilterReject = 2

FilterSkip

The node is skipped by the filter, but its descendants are still considered.

public const ushort FilterSkip = 3

ShowAll

Bit mask that shows all the node types.

public const uint ShowAll = 4294967295U

ShowAttribute

Bit mask that shows Attr nodes.

public const uint ShowAttribute = 2U

ShowCDataSection

Bit mask that shows CDATASection nodes.

public const uint ShowCDataSection = 8U

ShowComment

Bit mask that shows Comment nodes.

public const uint ShowComment = 128U

ShowDocument

Bit mask that shows Document nodes.

public const uint ShowDocument = 256U

ShowDocumentFragment

Bit mask that shows DocumentFragment nodes.

public const uint ShowDocumentFragment = 1024U

ShowDocumentType

Bit mask that shows DocumentType nodes.

public const uint ShowDocumentType = 512U

ShowElement

Bit mask that shows Element nodes.

public const uint ShowElement = 1U

ShowEntity

Bit mask for the legacy entity node type, which is never present in a tree.

public const uint ShowEntity = 32U

ShowEntityReference

Bit mask for the legacy entity reference node type, which is never present in a tree.

public const uint ShowEntityReference = 16U

ShowNotation

Bit mask for the legacy notation node type, which is never present in a tree.

public const uint ShowNotation = 2048U

ShowProcessingInstruction

Bit mask that shows ProcessingInstruction nodes.

public const uint ShowProcessingInstruction = 64U

ShowText

Bit mask that shows Text nodes.

public const uint ShowText = 4U