public Iterator getDescendantAxisIterator(Object contextNode) throws UnsupportedAxisException { return new DescendantAxisIterator( contextNode, this ); }
/** * Returns the next descendant node. * * @return the next descendant node * * @throws NoSuchElementException if no descendants remain * * @see java.util.Iterator#next() */ public Object next() { try { if (hasNext()) { Object node = children.next(); stack.add(children); children = navigator.getChildAxisIterator(node); return node; } throw new NoSuchElementException(); } catch (UnsupportedAxisException e) { throw new JaxenRuntimeException(e); } }
@Override public Iterator<?> getDescendantAxisIterator(final Object contextNode) throws UnsupportedAxisException { return new DescendantAxisIterator(contextNode, this); }