Java XML Child Element Create createChildElement(String tagName, Element parentElement)

Here you can find the source of createChildElement(String tagName, Element parentElement)

Description

create Child Element

License

Open Source License

Declaration

public static Element createChildElement(String tagName, Element parentElement) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Element;

public class Main {
    public static Element createChildElement(String tagName, Element parentElement) {
        Element result = parentElement.getOwnerDocument().createElement(tagName);
        parentElement.appendChild(result);
        return result;
    }/*from  ww  w.  j a  va  2 s  . c o m*/
}

Related

  1. createChildElement(Document doc, Node node, String nodeName)
  2. createChildElement(Element parent, String name)
  3. createChildElement(Element parentElement, String elementName)
  4. createChildElement(Element parentElement, String strTagName)
  5. createChildElement(final String tagName, final Node parent, final Document document)
  6. createTextChild(Node elem, String elemName, Boolean text)
  7. getChildElementByChain(Element element, String[] chain, boolean create)
  8. getOrCreateChildNode(IIOMetadataNode parentNode, String name)
  9. getOrCreateFirstTextChild(Element node)