This behavior is normal and spec-compliant. See the examples at: http://www.w3.org/TR/DOM-Level-2/traversal.html#Iterator-Moving
Chih-Hsiang Chou IBM Center for Java Technology - Silicon Valley [EMAIL PROTECTED] ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Xerces-Dev (E-Mail)" <[EMAIL PROTECTED]> Sent: Friday, February 25, 2000 7:24 AM Subject: [Xerces-J] NodeIteratorImpl behavior The NodeIteratorImpl class implements some strange behavior: when you iterate the nodes using nextNode(), the first call of previousNode() returns the same node as the last nextNode() call did. This unexpected bahavior is only described in the source code and not mentioned in the javadoc documentation (it is really hard to find). It is unexpected too, if you rely on the documentation of org.w3c.dom.traversal.NodeIterator . I learned that it is caused by the fCurrentNode pointer which is being _between_ two nodes. Is there a special reason that fCurrentNode does point between two nodes (instead directly on the last returned node, which would cause a more intuitive behavior)? Ciao, Bens. ______________________________________________________________________ _______ / __ /____________ ______ / /_/ // __ / // /\ Thomas Bensler / ___// /_/ / 7 ___/_/ debis Systemhaus GEI / __ 7 ___/ / /___ /\ Lademannbogen 21-23 / /_/ / / / / / / / D-22339 Hamburg /_______/_____/__/___/_______/ / fon: +49-40-5395-1879 \_______\_____\__\___\_______\/ net: [EMAIL PROTECTED]