public class ElementChildrenIterator extends java.lang.Object implements java.util.Iterator<Element>
Element.iterator() method.
Example usage:
ElementChildrenIterator hostIter = config.iterator("host");
while (hostIter.hasNext()) {
Element host = hostIter.next();
System.out.println("Host: " + host);
}
| Constructor and Description |
|---|
ElementChildrenIterator(NodeSet children)
Constructor to create new children iterator for all children.
|
ElementChildrenIterator(NodeSet children,
java.lang.String name)
Constructor to create a new children iterator for children of a specific
name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Element |
next()
Iterates the Node set.
|
Element |
nextElement()
Iterates the Node set.
|
void |
remove()
Remove is not supported.
|
public ElementChildrenIterator(NodeSet children)
public ElementChildrenIterator(NodeSet children, java.lang.String name)
public boolean hasNext()
hasNext in interface java.util.Iterator<Element>true if there are more children;
false otherwise.public Element nextElement()
public Element next()
next in interface java.util.Iterator<Element>public void remove()
remove in interface java.util.Iterator<Element>