public class TreeEnumeration implements >Enumeration { // Constructors public TreeEnumeration(Element node); public TreeEnumeration(Element node, boolean enumDir ); // Methods public boolean hasMoreElements(); public Object nextElement(); public void reset(); }
An Enumeration for iterating over the entire subtree of a given node in the XML tree, DFS or BFS
public TreeEnumeration(Element node);Creates new iterator for iterating over all of the children of the given root node.
public TreeEnumeration(Element node, boolean enumDir );
public boolean hasMoreElements();Return whether or not there are any more matching elements.
Return Value
Returns true if the next call to nextElement will return non null result.
public Object nextElement();Return the next matching element.
Return Value
Returns Element or null of there are no more matching elements.
public void reset();Reset the iterator so you can iterate through the elements again.