Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.xml.parsers.DocumentBuilderFactory;

public class Main {
    private static DocumentBuilderFactory DOM_FACTORY;

    public static synchronized DocumentBuilderFactory getDOMFactory() {
        if (DOM_FACTORY == null) {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            factory.setExpandEntityReferences(false);
            DOM_FACTORY = factory;
        }
        return DOM_FACTORY;
    }
}