This method of the Element interface contains the following signatures:
addChild(Element elem, Element after)
addChild(Element elem, int pos, int reserved)
Adds a child to this element. Any element can only have one parent element. As a result, the previous parent will lose this child from its subtree.
public void addChild(Element elem, Element after);
elem | The element to add. The child element becomes the last element if after is null. The child is added to the beginning of the list if after is this object. |
after | The element after which to add elem. |
Adds a child to this element.
public void addChild(Element elem, int pos, int reserved);
elem | The element to add. |
pos | The position to add this element (calling getChild(pos) will return this element). If pos is less than 0, elem becomes the new last element. |
reserved | The reserved parameter. |