Here you can find the source of addElement(Document doc, String name, Element parent)
public static Element addElement(Document doc, String name, Element parent)
//package com.java2s; /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under * the Apache 2.0 License, see http://coconut.codehaus.org/license. *//*from ww w . j a va 2 s . c o m*/ import org.w3c.dom.Document; import org.w3c.dom.Element; public class Main { public static Element addElement(Document doc, String name, Element parent) { Element ee = doc.createElement(name); parent.appendChild(ee); return ee; } }