M
Mausam
I have a java class, whose contains a DocumentFragment.
In the equals method of my class, I am converting the DocumentFragment to a String and comparing an equals on the String.
I know this is not the best way, because "attributes" e.g can change order in Element of DocumentFragment, or e.g documents differ only in the sequence of unordered elements.
So in such cases this equality will fail.
Please suggest a better approach.
In the equals method of my class, I am converting the DocumentFragment to a String and comparing an equals on the String.
I know this is not the best way, because "attributes" e.g can change order in Element of DocumentFragment, or e.g documents differ only in the sequence of unordered elements.
So in such cases this equality will fail.
Please suggest a better approach.