Java XML Element Child Append appendNewElement(Node parent, String elementName)

Here you can find the source of appendNewElement(Node parent, String elementName)

Description

append New Element

License

Open Source License

Declaration

public static Element appendNewElement(Node parent, String elementName) 

Method Source Code

//package com.java2s;

import org.w3c.dom.*;

public class Main {
    public static Element appendNewElement(Node parent, String elementName) {
        Element elementNode = parent.getOwnerDocument().createElement(elementName);
        parent.appendChild(elementNode);
        return elementNode;
    }//  w w  w  .j a  v a 2 s.c om
}

Related

  1. appendChildElementBoolean(Element parentNode, String tagName, boolean content)
  2. appendChildElmt(Element aElmt, String aChildName)
  3. appendNewComment(Element parentElement, String commentText)
  4. appendNewElement(Document document, Element parent, Enum el)
  5. appendNewElement(Document document, Element parent, String element, Object content, String namespace)
  6. appendNewElementIfNotNull(Document document, Element parent, Enum el, Object content, String namespace)
  7. appendNewElementIfNotNull(Document document, Element parent, Enum el, Object content, String namespace)
  8. appendNode(Node node, StringBuilder sb, int indent)