Java XML Element Create createElement(Element parent, String tagName)

Here you can find the source of createElement(Element parent, String tagName)

Description

create Element

License

Apache License

Declaration

static public Element createElement(Element parent, String tagName) 

Method Source Code

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

import org.w3c.dom.Element;

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

Related

  1. createElement(Document owner, String nsURI, String elementName, String textValue)
  2. createElement(Element parent, String elementName)
  3. createElement(Element parent, String name)
  4. createElement(Element parent, String name)
  5. createElement(Element parent, String path)
  6. createElement(Element parent, String tagName)
  7. createElement(Element parent, String tagName, String value)
  8. createElement(final Document document, final String elementName)
  9. createElement(final Document parentDocument, final String name)