code: public static Document deepCopy(Element child) {
  		Document mdDoc = DOCUMENT_BUILDER.newDocument();
  		Element el = (Element) mdDoc.importNode(child, true);
  		mdDoc.appendChild(el);
  		return mdDoc;
  	}
docs: Makes a deep-copy of an {@link Element} instance and appends it to a
  new {@link Document} instance as child.
  
  @param child the {@link Element} instnace to be deep-copied
  @return a new {@link Document} instance with a deep-copied child appended