Skip Headers

Oracle® XML API Reference
10g Release 1 (10.1)
Part No. B10789-01
  Go To Table Of Contents
Contents

Previous Next  

NodeIterator Interface

Table 8-3 summarizes the methods of available through the NodeIterator interface.

Table 8-3 Summary of NodeIterator Methods; Package Traversal

Function Summary
XmlDomIterDetach
Detach a node iterator (deactivate it).
XmlDomIterNextNode
Returns next node for iterator.
XmlDomIterPrevNode
Returns previous node for iterator.


XmlDomIterDetach

Detaches the NodeIterator from the set which it iterated over, releasing any resources and placing the iterator in the INVALID state. After detach has been invoked, calls to XmlDomIterNextNode or XmlDomIterPrevNode will raise the exception XMLERR_ITER_DETACHED.


Syntax
xmlerr XmlDomIterDetach(
   xmlctx *xctx, 
   xmliter *iter);

Parameter In/Out Description
xctx
IN
XML context
iter
IN
node iterator object


XmlDomIterNextNode

Returns the next node in the set and advances the position of the iterator in the set. After a node iterator is created, the first call to XmlDomIterNextNode returns the first node in the set. It assumed that the reference node (current iterator position) is never deleted. Otherwise, changes in the underlying DOM tree do not invalidate the iterator.


Syntax
xmlnode* XmlDomIterNextNode(
   xmlctx *xctx, 
   xmliter *iter, 
   xmlerr *xerr);

Parameter In/Out Description
xctx
IN
XML context
iter
IN
node iterator object
xerr
OUT
numeric return error code


Returns

(xmlnode *) next node in set being iterated over [or NULL]


XmlDomIterPrevNode

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


Syntax
xmlnode* XmlDomIterPrevNode(
   xmlctx *xctx, 
   xmliter *iter, 
   xmlerr *xerr);

Parameter In/Out Description
xctx
IN
XML context
iter
IN
node iterator object
xerr
OUT
numeric return error code


Returns

(xmlnode *) previous node in set being iterated over [or NULL]