Add a child to the child list.

@param newChild Child to add to children list

@return Child added to children list

@throws DOMException
178160
public ElemTemplateElement appendChild(ElemTemplateElement newChild)
  {

    int type = ((ElemTemplateElement) newChild).getXSLToken();

    switch (type)
    {
    case Constants.ELEMNAME_TEXTLITERALRESULT :
      break;
    default :
      error(XSLTErrorResources.ER_CANNOT_ADD,
            new Object[]{ newChild.getNodeName(),
                          this.getNodeName() });  //"Can not add " +((ElemTemplateElement)newChild).m_elemName +

    //" to " + this.m_elemName);
    }

    return super.appendChild(newChild);
  }
567592
public void addChild(TreeElement child)
            throws IllegalArgumentException
    {

        TreeElement theChild = child;
        theChild.setParent(this);
        if (getName() == null) {
            setName("0");
        }
        if (_children == null) {
            _children = new ArrayList();
        }
        //int n = _children.size();
        //if (n > 0) {
        //    TreeElement node = (TreeElement) _children.get(n - 1);
        //    node.setLast(false);
        //}
        //theChild.setLast(true);
        _children.add(child);
        int n = _children.size();
        theChild.updateName(this, n - 1);
    }
127208
def add_child(self, node):
        """"""
        node._parent = self
        self._children.append(node)
1164705
def add_child(self, child):
        '''
        '''
        if not isinstance(child, Node):
            raise TypeError("child must be a Node")
        self.children.append(child); child.parent = self
1335225
function addChild(child, node) {
    var children = node.children;
    if (child.parentNode === node) {
        return;
    }

    children.push(child);
    child.parentNode = node;
}
32691
def add_child(self, node, callback):
        """"""
        if node not in self.children:
            self.children.append(ChildNode(node, callback))
396863
public void addChildren( AstNode first,
                             AstNode second,
                             AstNode third ) {
        if (first != null) {
            this.addLastChild(first);
        }
        if (second != null) {
            this.addLastChild(second);
        }
        if (third != null) {
            this.addLastChild(third);
        }
    }
496745
def add_children(self, children):
        
        if not isinstance(children, list):
            raise TypeError('"children" must be a list')
        for child in children:
            self.add_child(child)
67833
private void addChildElements() {
		for (Node node : nodes) {
			Collection<? extends Node> childNodes = helper.getChildNodes(node);
			for (Node child : childNodes)
				if (matchTag(child))
					result.add(child);
		}
	}
107261
@SuppressWarnings("unchecked")
  public void addChildren(List<? extends N> children) {
    // NOTE: if the input list comes from another node, this could cause
    // ConcurrentModificationExceptions as nodes are moved from one parent to another.  To avoid
    // this we make a copy of the input list.
    for (Node child : children.toArray(new Node[0])) {
      addChild((N) child);
    }
  }
1124682
def add(self, child):
        

        if isinstance(child, With):
            self.add_with(child)
        elif isinstance(child, EventConnection):
            self.add_event_connection(child)
        elif isinstance(child, ChildInstance):
            self.add_child_instance(child)
        elif isinstance(child, MultiInstantiate):
            self.add_multi_instantiate(child)
        elif isinstance(child, ForEach):
            self.add_for_each(child)
        else:
            raise ModelError('Unsupported child element')
176545
public Node insertBefore(Node newChild, Node refChild) throws DOMException
  {

    error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"insertBefore not supported!");

    return null;
  }
549061
public void addChild(Item child) {
        if (children == null) {
            children = new ArrayList<>();
        }

        children.add(child);
    }
759440
public void addFirstChild( AstNode child ) {
        assert child != null;
        this.children.addFirst(child);
        child.removeFromParent();
        child.parent = this;
    }
360594
@Override
	public void addChildAt(final int index, final ITreeNode<T> child)
		throws IndexOutOfBoundsException
	{
		if (children != null && children.size() < index)
		{
			children.add(index, child);
		}
		else
		{
			addChild(child);
		}
	}
999928
public ElemTemplateElement appendChild(ElemTemplateElement newChild)
  {

    int type = ((ElemTemplateElement) newChild).getXSLToken();

    if (Constants.ELEMNAME_SORT == type)
    {
      setSortElem((ElemSort) newChild);

      return newChild;
    }
    else
      return super.appendChild(newChild);
  }
580133
public void addChildren( AstNode first,
                             AstNode second ) {
        if (first != null) {
            this.addLastChild(first);
        }
        if (second != null) {
            this.addLastChild(second);
        }
    }