Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7.1
-
None
-
OS : Windows
Description
Using a home-made DOM implementation, a problem has been raised while using the Xerces TreeWalker.
One of our test consists in traversing the same XML file using Xerces alone and Xerces with our DOM implementation at the same time. Each result of the getNextSibling() method is compared to verify that the result is the same.
In this test, we experienced a problem since we did not have the same results.
I found the problem in the TreeWalkerImpl class at line 315. At this line two nodes are compared with the '==' operator. Though it works fine when using Xerces by itself, it does not work when another DOM implementation is used. By replacing this operator by the 'isSameNode' method, we obtain valid results.