Utils.java Source code

Java tutorial

Introduction

Here is the source code for Utils.java

Source

import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class Utils {
    /**
     * Add Text object to an Element.
     * @param element the containing element
     * @param text the text to add
     */
    public static void addText(Element element, String text) {
        element.appendChild(element.getOwnerDocument().createTextNode(text));
    }
}