net.sf.saxon.tree.iter
Interface AxisIterator

All Superinterfaces:
SequenceIterator, UnfailingIterator
All Known Implementing Classes:
AxisIteratorImpl, EmptyIterator, NamespaceIterator, Navigator.AncestorEnumeration, Navigator.AxisFilter, Navigator.BaseEnumeration, Navigator.DescendantEnumeration, Navigator.EmptyTextFilter, Navigator.FollowingEnumeration, Navigator.PrecedingEnumeration, NodeArrayIterator, NodeListIterator, PrependIterator, ReverseNodeArrayIterator, SingleNodeIterator, VirtualCopy.VirtualCopier, VirtualUntypedCopy.VirtualUntypedCopier

public interface AxisIterator
extends UnfailingIterator

A SequenceIterator is used to iterate over a sequence. An AxisIterator is a SequenceIterator that throws no exceptions, and that always returns nodes. The nodes should all be in the same document (though there are some cases, such as PrependIterator, where this is the responsibility of the user of the class and is not enforced.)


Field Summary
 
Fields inherited from interface net.sf.saxon.om.SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
 
Method Summary
 Value atomize()
          Return the atomized value of the current node.
 CharSequence getStringValue()
          Return the string value of the current node.
 AxisIterator iterateAxis(byte axis, NodeTest test)
          Return an iterator over an axis, starting at the current node.
 boolean moveNext()
          Move to the next node, without returning it.
 
Methods inherited from interface net.sf.saxon.tree.iter.UnfailingIterator
current, getAnother, next, position
 
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, getProperties
 

Method Detail

moveNext

boolean moveNext()
Move to the next node, without returning it. Returns true if there is a next node, false if the end of the sequence has been reached. After calling this method, the current node may be retrieved using the current() function.


iterateAxis

AxisIterator iterateAxis(byte axis,
                         NodeTest test)
Return an iterator over an axis, starting at the current node.

Parameters:
axis - the axis to iterate over, using a constant such as Axis.CHILD
test - a predicate to apply to the nodes before returning them.
Throws:
NullPointerException - if there is no current node

atomize

Value atomize()
              throws XPathException
Return the atomized value of the current node.

Returns:
the atomized value.
Throws:
NullPointerException - if there is no current node
XPathException

getStringValue

CharSequence getStringValue()
Return the string value of the current node.

Returns:
the string value, as an instance of CharSequence.
Throws:
NullPointerException - if there is no current node


Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.