Java XML Text Node Create appendElementChild(Document doc, Element parent, String name)

Here you can find the source of appendElementChild(Document doc, Element parent, String name)

Description

append Element Child

License

Apache License

Declaration

public static Element appendElementChild(Document doc, Element parent, String name) 

Method Source Code


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

import org.w3c.dom.*;

public class Main {
    public static Element appendElementChild(Document doc, Element parent, String name) {
        Element el = doc.createElement(name);
        parent.appendChild(el);/*  w  ww  .  j a  v  a  2 s  . com*/
        return el;
    }
}

Related

  1. addTextElement(Document document, Node parentNode, String elementName, String elementText)
  2. addTextElement(final Document document, final Element parentDom, final String namespace, final String name, final String value)
  3. addTextElement(final Document document, final Element parentDom, final String namespace, final String name, final String value)
  4. addTextNode(Document document, Element ret, String tag, String value)
  5. addTextNode(Document XMLDocument, Node rootElement, String tagName, String text)
  6. appendElementChildWithText(Document doc, Element parent, String name, String text)
  7. createText(Document doc, Node parent, String contents)
  8. createText(DocumentFragment fragment)
  9. createTextChildElement(Document doc, Node node, String name, String value)