.TH "DOM::NodeIterator" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.ti -1c
.RI "unsigned long \fBwhatToShow\fP ()"
.br
.ti -1c
.RI "\fBNodeFilter\fP \fBfilter\fP ()"
.br
.ti -1c
.RI "bool \fBexpandEntityReferences\fP ()"
.br
.ti -1c
.RI "\fBNode\fP \fBnextNode\fP ()"
.br
.ti -1c
.RI "\fBNode\fP \fBpreviousNode\fP ()"
.br
.ti -1c
.RI "void \fBdetach\fP ()"
.br
.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. 
.PP
Definition at line 62 of file dom2_traversal.cpp.
.SS "unsigned long NodeIterator::whatToShow ()"
.PP
This attribute determines which node types are presented via the iterator. 
.PP
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. 
.PP
Definition at line 68 of file dom2_traversal.cpp.
.SS "\fBNodeFilter\fP NodeIterator::filter ()"
.PP
The \fBNodeFilter\fP used to screen nodes. 
.PP
Definition at line 74 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. 
.PP
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. 
.PP
Definition at line 80 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. 
.PP
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 \fCnull\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

.PP
Definition at line 86 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. 
.PP
\fBReturns:\fP
.RS 4
The previous \fC\fBNode\fP\fP in the set being iterated over, or \fCnull\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

.PP
Definition at line 98 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. 
.PP
After detach has been invoked, calls to nextNode or previousNode will raise the exception INVALID_STATE_ERR. 
.PP
Definition at line 110 of file dom2_traversal.cpp.

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