|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ModelWalker represents a certain way to navigate through a XPath tree.
Usage:
ModelWalker walker = ... XPathNode startNode = ... XPathNode node = walker.gotoFirstNode(startNode); while(node != null) { ... node = walker.gotoNextNode(node); }The ModelWalker interface is designed to allow implementations that don't need store internal state as a iterator would have to and therefore can be implemented as singleton objects (for example some axis classes represents ModelWalkers for their axis nodes).
Method Summary | |
XPathNode |
gotoFirstNode(XPathNode startNode)
Return the first node of the path defined by the startNode |
XPathNode |
gotoNextNode(XPathNode lastNode)
Return the next node of the path. |
Method Detail |
public XPathNode gotoFirstNode(XPathNode startNode)
public XPathNode gotoNextNode(XPathNode lastNode)
lastNode
- a XPathNode obtained from the last call
to gotoFirstNode or gotoNextNode.
If the node is another node the behaviour is not determined.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |