Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.*;

public class Main {
    /** Add a Text element to a Document */
    public static Text addChildTextElement(Document doc, Node parent, String tag, String value) {

        Element e = doc.createElement(tag);
        Text t = doc.createTextNode(value);
        e.appendChild(t);
        parent.appendChild(e);
        return t;
    }
}