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;

public class Main {
    /**
     * Creates the root tag node.
     *
     * @param baseDocument
     *            the base document
     * @param rootTagName
     *            the root tag name
     * @return the element
     */
    public static Element createRootTagNode(Document baseDocument, String rootTagName) {
        Element newNode = baseDocument.createElement(rootTagName);
        baseDocument.appendChild(newNode);
        return newNode;
    }
}