code: protected void replaceWithChildren(Element element)
      {
          Element parent = (Element) element.getParentNode();
          while (element.getFirstChild() != null) {
              parent.insertBefore(element.removeChild(element.getFirstChild()), element);
          }
          parent.removeChild(element);
      }
docs: Replaces the given {@link Element} with it's children.
  
  @param element the {@link Element} to be replaced.