Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

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

public class Main {
    public static Document blankDocument(String paramString) throws Exception {
        DocumentBuilderFactory localDocumentBuilderFactory = DocumentBuilderFactory.newInstance();
        localDocumentBuilderFactory.setIgnoringComments(false);
        localDocumentBuilderFactory.setIgnoringElementContentWhitespace(false);
        localDocumentBuilderFactory.setValidating(false);
        localDocumentBuilderFactory.setCoalescing(false);
        DocumentBuilder localDocumentBuilder = localDocumentBuilderFactory.newDocumentBuilder();
        Document localDocument = localDocumentBuilder.newDocument();
        Element localElement = localDocument.createElement(paramString);
        localDocument.appendChild(localElement);
        return localDocument;
    }
}