|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.velocity.anakia.TreeWalker
This class allows you to walk a tree of JDOM Element objects.
It first walks the tree itself starting at the Element passed
into allElements() and stores each node of the tree
in a Vector which allElements() returns as a result of its
execution. You can then use a #foreach in Velocity to walk
over the Vector and visit each Element node. However, you can
achieve the same effect by calling element.selectNodes("//*")
.
Constructor Summary | |
TreeWalker()
Empty constructor |
Method Summary | |
NodeList |
allElements(org.jdom.Element e)
Creates a new Vector and walks the Element tree. |
private void |
treeWalk(org.jdom.Element e,
java.util.Collection theElements)
A recursive method to walk the Element tree. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TreeWalker()
Method Detail |
public NodeList allElements(org.jdom.Element e)
private final void treeWalk(org.jdom.Element e, java.util.Collection theElements)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |