code: public void replaceWith(Node in) {
          Validate.notNull(in);
          Validate.notNull(parentNode);
          parentNode.replaceChild(this, in);
      }
docs: Replace this node in the DOM with the supplied node.
  @param in the node that will will replace the existing node.