Возвращает unsigned long, являющийся маской битов, состоящей из констант, описывающих типы Node, которые должны быть представлены. Несоответствующие узлы пропускаются, но их дочерние элементы могут быть включены, если это необходимо. Возможные значения:
<tr>
<td class="header">Constant</td>
<td class="header">Numerical value</td>
<td class="header">Description</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_ALL</code></td>
<td><code>-1</code> (that is the max value of <code>unsigned long</code>)</td>
<td>Shows all nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_ATTRIBUTE</code> <em>(deprecated)</em></td>
<td><code>2</code></td>
<td>Shows attribute <code>Attr</code> nodes. This is meaningful only when creating a <code>NodeIterator</code> with an <code>Attr</code> 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.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_CDATA_SECTION</code> <em>(deprecated)</em></td>
<td><code>8</code></td>
<td>Shows <code>CDATASection</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_COMMENT</code></td>
<td><code>128</code></td>
<td>Shows <code>Comment</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_DOCUMENT</code></td>
<td><code>256</code></td>
<td>Shows <code>Document</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_DOCUMENT_FRAGMENT</code></td>
<td><code>1024</code></td>
<td>Shows <code>DocumentFragment</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_DOCUMENT_TYPE</code></td>
<td><code>512</code></td>
<td>Shows <code>DocumentType</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_ELEMENT</code></td>
<td><code>1</code></td>
<td>Shows <code>Element</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_ENTITY</code> <em>(deprecated)</em></td>
<td><code>32</code></td>
<td>Shows <code>Entity</code> nodes. This is meaningful only when creating a <code>NodeIterator</code> with an <code>Entity</code> node as its root; in this case, it means that the <code>Entity</code> 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.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_ENTITY_REFERENCE</code> <em>(deprecated)</em></td>
<td><code>16</code></td>
<td>Shows <code>EntityReference</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_NOTATION</code> <em>(deprecated)</em></td>
<td><code>2048</code></td>
<td>Shows <code>Notation</code> nodes. This is meaningful only when creating a <code>NodeIterator</code> with a <code>Notation</code> node as its root; in this case, it means that the <code>Notation</code> 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.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_PROCESSING_INSTRUCTION</code></td>
<td><code>64</code></td>
<td>Shows <code>ProcessingInstruction</code> nodes.</td>
</tr>
<tr>
<td><code>NodeFilter.SHOW_TEXT</code></td>
<td><code>4</code></td>
<td>Shows <code>Text</code> nodes.</td>
</tr>