This method of the Document class adds a child Element to the document. This is an override of the Element.addChild method that stores the new child and stores the last element of type Element.ELEMENT, so that getRoot can be used as a shortcut to find a particular element.
public void addChild(Element elem, Element after);
elem | The child element to add. |
after | The element after which to add the elem element. |
addChild(Element,Element) in ElementImpl.