/** * Retrieves an <code>Iterator</code> matching the <code>child</code> XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the child axis are not supported by this * object model */ public Iterator getChildAxisIterator(Object contextNode) throws UnsupportedAxisException { if (contextNode instanceof OMContainer) { return ((OMContainer) contextNode).getChildren(); } return JaxenConstants.EMPTY_ITERATOR; }
/** Removes the contents (i.e. children) of the container. */ public static void removeContents(OMContainer container) { for (Iterator<?> iterator = container.getChildren(); iterator.hasNext();) { iterator.next(); iterator.remove(); } }
/** Removes the contents (i.e. children) of the container. */ public static void removeContents(OMContainer container) { for (Iterator<?> iterator = container.getChildren(); iterator.hasNext();) { iterator.next(); iterator.remove(); } }
/** Removes the contents (i.e. children) of the container. */ public static void removeContents(OMContainer container) { for (Iterator<?> iterator = container.getChildren(); iterator.hasNext();) { iterator.next(); iterator.remove(); } }
/** Removes the contents (i.e. children) of the container. */ public static void removeContents(OMContainer container) { for (Iterator<?> iterator = container.getChildren(); iterator.hasNext();) { OMNode child = (OMNode) iterator.next(); child.detach(); } }