if (nt == Node.ELEMENT_NODE) {
Node parent = n.getParentNode();
AbstractElement e = (AbstractElement) createElementNS(ns, qn);
// Move event handlers across
EventSupport es1 = an.getEventSupport();
if (es1 != null) {
EventSupport es2 = e.getEventSupport();
if (es2 == null) {
AbstractDOMImplementation di
= (AbstractDOMImplementation) implementation;
es2 = di.createEventSupport(e);
setEventsEnabled(true);