[jdom-interest] Element comparison

Jason Hunter jhunter at acm.org
Mon Jul 31 12:52:37 PDT 2000


> I need some function to compare the element I created with the 
> element in the existing document so that I can remove it. 

Standard thing to do is get the List of content, then remove the
offending element.  How you determine the "offending element" is your
decision, and if you want to compare against an existing element in some
way, then just write that code.  We didn't write .equals() because to do
a .equals() on an Element is potentially fully recursive down the
document, and odds are you really just want to compare names and
namespaces or something.

-jh-



More information about the jdom-interest mailing list