Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/**
 * This file belongs to the BPELUnit utility and Eclipse plugin set. See enclosed
 * license file for more information.
 */

import org.w3c.dom.Element;

import org.w3c.dom.Text;

public class Main {
    /**
     * DOM Level 2 compliant method for adding text to an element
     * 
     * @param e
     *            element to which text should be added
     * @param contents
     *            new text to be added
     * @return
     */
    public static Text appendTextNode(Element e, String contents) {
        Text textNode = e.getOwnerDocument().createTextNode(contents);
        e.appendChild(textNode);
        return textNode;
    }
}