Java XML Child Element Add addChild(final Node node, final Node child)

Here you can find the source of addChild(final Node node, final Node child)

Description

add Child

License

Apache License

Declaration

public static final void addChild(final Node node, final Node child) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.Node;

public class Main {
    public static final void addChild(final Node node, final Node child) {
        if (node != null) {
            node.appendChild(child);//w ww  .j ava  2 s . c o m
        }
    }
}

Related

  1. addAsFirstChild(Element element, Element newChild)
  2. AddChild(Element parent, String nodename)
  3. addChild(Node parent, Node child)
  4. addChild(Node parent, String name, String text)
  5. addChild(Node parent, String namespaceURI, String childName)
  6. addChildElement(Element element, String name, Object textValue)