Replaces the given {@link Element} with it's children.

@param element the {@link Element} to be replaced.
355911
protected void replaceWithChildren(Element element)
    {
        Element parent = (Element) element.getParentNode();
        while (element.getFirstChild() != null) {
            parent.insertBefore(element.removeChild(element.getFirstChild()), element);
        }
        parent.removeChild(element);
    }
898148
function(element) {
        element = OpenLayers.Util.getElement(element);
        element.parentNode.removeChild(element);
    }
1283407
public static void clearHover(Element element) {

        Element parent = element.getParentElement();
        Element sibling = element.getNextSiblingElement();
        element.removeFromParent();
        parent.insertBefore(element, sibling);
    }
778761
@Override
    public void remove(long key, T element) {
    	if (first.value == key && ObjectUtil.equalsOrNull(element, first.element)) {
    		removeMin();
    		return;
    	}
    	if (last.value == key && ObjectUtil.equalsOrNull(element, last.element)) {
    		removeMax();
    		return;
    	}
    	
    	// if both children of root are black, set root to red
    	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
            root.red = true;

        root = remove(root, key, element);
        if (root != null) root.red = false;
    }
558552
public static void setDocumentElement(final Document document, final Element element) {
        Element documentElement = document.getDocumentElement();
        if (documentElement != null) {
            document.removeChild(documentElement);
        }
        if (element != null) {
            if (element.getOwnerDocument().equals(document)) {
                document.appendChild(element);
                return;
            }
            Node node = document.adoptNode(element);
            document.appendChild(node);
        }
    }
1232018
public T addElement(T element) {
		// make sure that elements are initialized
		getElements();
		if (!containsElement(this.elements, element)) {
			this.elements.add(element);
			element.addChangeListener(this.elementChangeListener);
			element.notifyState();
			return element;
		}
		throw new RuntimeException(element.toString() + " already exists");
	}
876259
public synchronized void addElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.add(element);
		
		swapWithList(newList);
	}
742440
public void addChildElement(Node element) {
        element.setParent(this);
        emptyElementTag = false; // can't be an empty element tag if you attach child elements
        childElements.add(element);
    }
483262
public void setIfexistsone(String elements) {

        if (elements != null) {
            m_elementlist = elements;
            m_checkall = false;
            m_checknone = false;
        }
    }
788586
public static void removeChildrenFrom(Element element) {
        if (element != null) {
            while (element.firstChild != null) {
                element.removeChild(element.firstChild);
            }
        }
    }
1310739
public void addElement(ObjectProperty element) {
        assertNotNull(element);
        if (elements == null) {
            elements = new ArrayList<ObjectProperty>();
        }
        elements.add(element);
        element.setParent(this);
    }
370248
public Xml addElement(Element element) {
        if(current != null) {
            // attach to existing model
            current.addChildElement(element);
        } else {
            // attach to a new model
            root =  element;
        }
        if(! element.isEmptyElementTag()) {
            current = element;
        }
        return this;
    }
340721
public void addElement(Element element) {
		synchronized(lock) {
			checkNotFrozen();
			element.setPage(this);
			// elements
			if(elements == null) elements = new ArrayList<>();
			elements.add(element);
			// elementsById
			addToElementsById(element, false);
		}
	}
792248
public void deleteElement(Object parent, String name) {
		if (isAttached()) {
			helper.deleteElement(parent, name);
		}
	}
379046
public final void replaceChild(Node child, Node newChild) {
    checkArgument(newChild.next == null, "The new child node has next siblings.");
    checkArgument(newChild.previous == null, "The new child node has previous siblings.");
    checkArgument(newChild.parent == null, "The new child node already has a parent.");
    checkState(child.parent == this, "%s is not the parent of %s", this, child);

    // Copy over important information.
    newChild.useSourceInfoIfMissingFrom(child);
    newChild.parent = this;

    Node nextSibling = child.next;
    Node prevSibling = child.previous;

    Node last = first.previous;

    if (child == prevSibling) {  // first and only child
      first = newChild;
      first.previous = newChild;
    } else {
      if (child == first) {
        first = newChild;
        // prevSibling == last, and last.next remains null
      } else {
        prevSibling.next = newChild;
      }

      if (child == last) {
        first.previous = newChild;
      } else {
        nextSibling.previous = newChild;
      }

      newChild.previous = prevSibling;
    }
    newChild.next = nextSibling;  // maybe null

    child.next = null;
    child.previous = null;
    child.parent = null;
  }
1029437
public void push(final T element) {
    int newSize = this.size + 1;
    this.ensure(newSize);
    this.elements[this.size++] = element;
  }
1285046
public void add(JsonElement element) {
    if (element == null) {
      element = JsonNull.INSTANCE;
    }
    elements.add(element);
  }