boolean (JDOMExternalizable e1, JDOMExternalizable e2) { Element root1 = new Element("root"); Element root2 = new Element("root"); try { e1.writeExternal(root1); } catch (WriteExternalException e) { LOG.debug(e); } try { e2.writeExternal(root2); } catch (WriteExternalException e) { LOG.debug(e); } return elementsEqual(root1, root2); }