Hi, all
I have the following piece of code:
import com.google.gwt.xml.client.*;
Document myDoc=XMLParser.parse(myXML);
for (int i=0;i<10;i++)
{
Window.alert("Hashcode="+ myDoc.getFirstChild().hashCode());
}
Output:
Hashcode=3
Hashcode=4
....
Hashcode=12
So, what do i see is that each time the hashCode function produces
different result.
As far as i understand, the latter means that:
a) getFirstChild produces a new object instance of Node interface
b) I cannot store Node objects in Hash-based collections
So, what do you think - is there some workaround to make DOM
implementation work in the manner which is similar to Java
implementations, where nodes are immutable?
Best regards.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.