http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Installation
Build

API Docs
Samples
Programming
Migration
FAQs

Releases
Feedback
Bug-Todo

Download
CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DOM_NodeIterator Class Reference

NodeIterators are used to step through a set of nodes e.g. More...

#include <DOM_NodeIterator.hpp>

List of all members.

Public Methods

Constructors and assignment operator
 DOM_NodeIterator ()
 Default constructor.

 DOM_NodeIterator (const DOM_NodeIterator &other)
 Copy constructor. More...

DOM_NodeIterator& operator= (const DOM_NodeIterator &other)
 Assignment operator. More...

DOM_NodeIterator& operator= (const DOM_NullPtr *val)
 Assignment operator. More...

Destructor.
 ~DOM_NodeIterator ()
 Destructor for DOM_NodeIterator.

Equality and Inequality operators.
bool operator== (const DOM_NodeIterator & other) const
 The equality operator. More...

bool operator== (const DOM_NullPtr *other) const
 Compare with a pointer. More...

bool operator!= (const DOM_NodeIterator & other) const
 The inequality operator. More...

bool operator!= (const DOM_NullPtr * other) const
 Compare with a pointer. More...

Get functions.
unsigned long getWhatToShow ()
 Return which node types are presented via the iterator. More...

DOM_NodeFiltergetFilter ()
 Return The filter used to screen nodes. More...

bool getExpandEntityReferences ()
 Return the expandEntityReferences flag. More...

DOM_Node nextNode ()
 Returns the next node in the set and advances the position of the iterator in the set. More...

DOM_Node previousNode ()
 Returns the previous node in the set and moves the position of the iterator backwards in the set. More...

Detaching functions.
void detach ()
 Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. More...


Protected Methods

 DOM_NodeIterator (NodeIteratorImpl* impl)

Friends

class  DOM_Document


Detailed Description

NodeIterators are used to step through a set of nodes e.g.

the set of nodes in a NodeList, 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 NodeIterator. DOM Level 2 specifies a single NodeIterator implementation for document-order traversal of a document subtree. Instances of these iterators are created by calling DocumentTraversal.createNodeIterator().

"Experimental - subject to change"


Constructor & Destructor Documentation

DOM_NodeIterator::DOM_NodeIterator ( )
 

Default constructor.

DOM_NodeIterator::DOM_NodeIterator ( const DOM_NodeIterator & other )
 

Copy constructor.

Parameters:
other   The object to be copied.

DOM_NodeIterator::~DOM_NodeIterator ( )
 

Destructor for DOM_NodeIterator.

DOM_NodeIterator::DOM_NodeIterator ( NodeIteratorImpl * impl ) [protected]
 


Member Function Documentation

void DOM_NodeIterator::detach ( )
 

Detaches the iterator 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.

"Experimental - subject to change"

bool DOM_NodeIterator::getExpandEntityReferences ( )
 

Return the expandEntityReferences flag.

The value of this flag determines whether the children of entity reference nodes are visible to the DOM_NodeFilter. If false, they will be skipped over.

"Experimental - subject to change"

DOM_NodeFilter * DOM_NodeIterator::getFilter ( )
 

Return The filter used to screen nodes.

"Experimental - subject to change"

unsigned long DOM_NodeIterator::getWhatToShow ( )
 

Return which node types are presented via the iterator.

The available set of constants is defined in the DOM_NodeFilter interface.

"Experimental - subject to change"

DOM_Node DOM_NodeIterator::nextNode ( )
 

Returns the next node in the set and advances the position of the iterator in the set.

After a DOM_NodeIterator is created, the first call to nextNode() returns the first node in the set.

"Experimental - subject to change"

Exceptions:
DOMException   INVALID_STATE_ERR: Raised if this method is called after the detach method was invoked.

bool DOM_NodeIterator::operator!= ( const DOM_NullPtr * other ) const
 

Compare with a pointer.

Intended only to allow a convenient comparison with null.

bool DOM_NodeIterator::operator!= ( const DOM_NodeIterator & other ) const
 

The inequality operator.

See operator ==.

DOM_NodeIterator & DOM_NodeIterator::operator= ( const DOM_NullPtr * val )
 

Assignment operator.

This overloaded variant is provided for the sole purpose of setting a DOM_NodeIterator to null.

Parameters:
val.   Only a value of 0, or null, is allowed.

DOM_NodeIterator & DOM_NodeIterator::operator= ( const DOM_NodeIterator & other )
 

Assignment operator.

Parameters:
other   The object to be copied.

bool DOM_NodeIterator::operator== ( const DOM_NullPtr * other ) const
 

Compare with a pointer.

Intended only to allow a convenient comparison with null.

bool DOM_NodeIterator::operator== ( const DOM_NodeIterator & other ) const
 

The equality operator.

Parameters:
other   The object reference with which this object is compared
Returns:
True if both DOM_NodeIterators refer to the same actual node, or are both null; return false otherwise.

DOM_Node DOM_NodeIterator::previousNode ( )
 

Returns the previous node in the set and moves the position of the iterator backwards in the set.

"Experimental - subject to change"

Exceptions:
DOMException   INVALID_STATE_ERR: Raised if this method is called after the detach method was invoked.


Friends And Related Function Documentation

class DOM_Document [friend]
 


The documentation for this class was generated from the following file:


Copyright © 2000 The Apache Software Foundation. All Rights Reserved.