protected void addNode(org.w3c.dom.Node newElement) throws SOAPException { insertBefore(newElement, null); if (getOwnerDocument() instanceof DocumentFragment) return; if (newElement instanceof ElementImpl) { ElementImpl element = (ElementImpl) newElement; QName elementName = element.getElementQName(); if (!"".equals(elementName.getNamespaceURI())) { element.ensureNamespaceIsDeclared(elementName.getPrefix(), elementName.getNamespaceURI()); } } }