Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

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

public class Main {
    public static void addToXMLDoc(Document _doc, Element _element, String _tag, String _text) {
        Element child = _doc.createElement(_tag);
        _element.appendChild(child);
        Text childText = _doc.createTextNode(_text);
        child.appendChild(childText);
    }
}