import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class Utils {
/**
* Add a new element to the given parent
* @param parent the parent Element
* @param name the child name
* @return new Element
*/
public static Element createElement(Element parent, String name) {
Document document;
Element element;
document = parent.getOwnerDocument();
element = document.createElement(name);
parent.appendChild(element);
return element;
}
}
sources68 the directory containing the programming examples, source code and programming guide online
Friday, 5 August 2011
Add a new element to the given parent
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment