|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.bowstreet.util.XmlTreeWalker
public class XmlTreeWalker
Walker for IXml elements in tree. This is useful for walking through an entire tree of XML elements. Does "preorder" depth-first walking.
| Constructor Summary | |
|---|---|
XmlTreeWalker(IXml initial)
Constructs a tree walker starting at the specified XML element. |
|
| Method Summary | |
|---|---|
IXml |
getCurrent()
Returns the current element. |
IXml |
getNext()
Advances to the next element, and makes that current. |
IXml |
getNext(java.lang.String name)
Convenience method to walk only through elements with the specified tag name. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the interation. |
void |
remove()
Removes the current node from the tree and backs up the current so that the next call to getNext() will continue without skipping any nodes |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlTreeWalker(IXml initial)
| Method Detail |
|---|
public IXml getCurrent()
public IXml getNext()
public IXml getNext(java.lang.String name)
name - The tag to match.
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorjava.util.NoSuchElementException - iteration has no more elements.public void remove()
remove in interface java.util.Iterator
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||