Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;

public class Main {
    private static String filepath = Thread.currentThread().getContextClassLoader().getResource("process.xml")
            .getPath();

    public static synchronized Document getDocument() throws Exception {
        // System.out.println(filepath);
        return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(filepath);

    }
}