.TH "DOM::NodeIterator" 3 "28 Jan 2004" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::NodeIterator \- NodeIterators are used to step through a set of nodes, e.g.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <dom2_traversal.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBNodeIterator\fP (const  \fBNodeIterator\fP &other)"
.br
.ti -1c
.RI "\fBNodeIterator\fP & \fBoperator=\fP (const  \fBNodeIterator\fP &other)"
.br
.ti -1c
.RI "\fBNode\fP \fBroot\fP ()"
.br
.RI "\fIThe root node of the \fBNodeIterator\fP, as specified when it was created. \fP"
.ti -1c
.RI "unsigned long \fBwhatToShow\fP ()"
.br
.RI "\fIThis attribute determines which node types are presented via the iterator. \fP"
.ti -1c
.RI "\fBNodeFilter\fP \fBfilter\fP ()"
.br
.RI "\fIThe \fBNodeFilter\fP used to screen nodes. \fP"
.ti -1c
.RI "bool \fBexpandEntityReferences\fP ()"
.br
.RI "\fIThe value of this flag determines whether the children of entity reference nodes are visible to the iterator. \fP"
.ti -1c
.RI "\fBNode\fP \fBnextNode\fP ()"
.br
.RI "\fIReturns the next node in the set and advances the position of the Iterator in the set. \fP"
.ti -1c
.RI "\fBNode\fP \fBpreviousNode\fP ()"
.br
.RI "\fIReturns the previous node in the set and moves the position of the Iterator backwards in the set. \fP"
.ti -1c
.RI "void \fBdetach\fP ()"
.br
.RI "\fIDetaches the \fBNodeIterator\fP from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. \fP"
.ti -1c
.RI "NodeIteratorImpl * \fBhandle\fP () const "
.br
.ti -1c
.RI "bool \fBisNull\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBNodeIterator\fP (NodeIteratorImpl *i)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "NodeIteratorImpl * \fBimpl\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBNodeIteratorImpl\fP"
.br
.ti -1c
.RI "class \fBDocument\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
NodeIterators are used to step through a set of nodes, e.g. 

the set of nodes in a \fBNodeList\fP, the document subtree governed by a particular node, the results of a query, or any other set of nodes. The set of nodes to be iterated is determined by the implementation of the \fBNodeIterator\fP. \fBDOM\fP Level 2 specifies a single \fBNodeIterator\fP implementation for document-order traversal of a document subtree. Instances of these iterators are created by calling DocumentTraversal.createNodeIterator().
.PP
Any Iterator that returns nodes may implement the \fC \fBNodeIterator\fP \fP interface. Users and vendor libraries may also choose to create Iterators that implement the \fC \fBNodeIterator\fP \fP interface. 
.PP
Definition at line 60 of file dom2_traversal.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBNode\fP NodeIterator::root ()"
.PP
The root node of the \fBNodeIterator\fP, as specified when it was created. Definition at line 64 of file dom2_traversal.cpp.
.SS "unsigned long NodeIterator::whatToShow ()"
.PP
This attribute determines which node types are presented via the iterator. The available set of constants is defined in the \fBNodeFilter\fP interface. Nodes not accepted by whatToShow will be skipped, but their children may still be considered. Note that this skip takes precedence over the filter, if any. Definition at line 70 of file dom2_traversal.cpp.
.SS "\fBNodeFilter\fP NodeIterator::filter ()"
.PP
The \fBNodeFilter\fP used to screen nodes. Definition at line 76 of file dom2_traversal.cpp.
.SS "bool NodeIterator::expandEntityReferences ()"
.PP
The value of this flag determines whether the children of entity reference nodes are visible to the iterator. If false, they and their descendents will be rejected. Note that this rejection takes precedence over whatToShow and the filter. Also note that this is currently the only situation where NodeIterators may reject a complete subtree rather than skipping individual nodes.
.PP
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set expandEntityReferences to true when creating the iterator. To produce a view of the document that has entity reference nodes but no entity expansion, use the whatToShow flags to show the entity reference node and set expandEntityReferences to false. Definition at line 82 of file dom2_traversal.cpp.
.SS "\fBNode\fP NodeIterator::nextNode ()"
.PP
Returns the next node in the set and advances the position of the Iterator in the set. After a \fBNodeIterator\fP is created, the first call to \fBnextNode()\fP returns the first node in the set.
.PP
\fBReturns:\fP
.RS 4
The next \fC \fBNode\fP \fP in the set being iterated over, or \fC null \fP if there are no more members in that set.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIExceptions\fP from user code Any exceptions raised by a user-written Filter will propagate through. 
.RE
.PP
Definition at line 88 of file dom2_traversal.cpp.
.SS "\fBNode\fP NodeIterator::previousNode ()"
.PP
Returns the previous node in the set and moves the position of the Iterator backwards in the set. \fBReturns:\fP
.RS 4
The previous \fC \fBNode\fP \fP in the set being iterated over, or \fC null \fP if there are no more members in that set.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIExceptions\fP from user code Any exceptions raised by a user-written Filter will propagate through. 
.RE
.PP
Definition at line 100 of file dom2_traversal.cpp.
.SS "void NodeIterator::detach ()"
.PP
Detaches the \fBNodeIterator\fP from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise the exception INVALID_STATE_ERR. Definition at line 112 of file dom2_traversal.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
