enum Poco::XML::NodeFilter::WhatToShow

Overview

These are the available values for the whatToShow parameter used in TreeWalkers and NodeIterators. Moreā€¦

#include <NodeFilter.h>

enum WhatToShow
{
    SHOW_ALL                    = 0xFFFFFFFF,
    SHOW_ELEMENT                = 0x00000001,
    SHOW_ATTRIBUTE              = 0x00000002,
    SHOW_TEXT                   = 0x00000004,
    SHOW_CDATA_SECTION          = 0x00000008,
    SHOW_ENTITY_REFERENCE       = 0x00000010,
    SHOW_ENTITY                 = 0x00000020,
    SHOW_PROCESSING_INSTRUCTION = 0x00000040,
    SHOW_COMMENT                = 0x00000080,
    SHOW_DOCUMENT               = 0x00000100,
    SHOW_DOCUMENT_TYPE          = 0x00000200,
    SHOW_DOCUMENT_FRAGMENT      = 0x00000400,
    SHOW_NOTATION               = 0x00000800,
};

Detailed Documentation

These are the available values for the whatToShow parameter used in TreeWalkers and NodeIterators.

They are the same as the set of possible types for Node, and their values are derived by using a bit position corresponding to the value of nodeType for the equivalent node type. If a bit in whatToShow is set false, that will be taken as a request to skip over this type of node; the behavior in that case is similar to that of FILTER_SKIP.

Note that if node types greater than 32 are ever introduced, they may not be individually testable via whatToShow. If that need should arise, it can be handled by selecting SHOW_ALL together with an appropriate NodeFilter.

Enum Values

SHOW_ALL

Show all Nodes.

SHOW_ELEMENT

Show Element nodes.

SHOW_ATTRIBUTE

Show Attr nodes.

This is meaningful only when creating an iterator or tree-walker with an attribute node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree.

SHOW_TEXT

Show Text nodes.

SHOW_CDATA_SECTION

Show CDATASection nodes.

SHOW_ENTITY_REFERENCE

Show EntityReference nodes.

SHOW_ENTITY

Show Entity nodes.

This is meaningful only when creating an iterator or tree-walker with an Entity node as its root; in this case, it means that the Entity node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.

SHOW_PROCESSING_INSTRUCTION

Show ProcessingInstruction nodes.

SHOW_COMMENT

Show Comment nodes.

SHOW_DOCUMENT

Show Document nodes.

SHOW_DOCUMENT_TYPE

Show DocumentType nodes.

SHOW_DOCUMENT_FRAGMENT

Show DocumentFragment nodes.

SHOW_NOTATION

Show Notation nodes.

This is meaningful only when creating an iterator or tree-walker with a Notation node as its root; in this case, it means that the Notation node will appear in the first position of the traversal. Since notations are not part of the document tree, they do not appear when traversing over the document tree.