Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javax.xml.xpath.*;

public class Main {
    private static XPathFactory xpathFactory = null;

    /**
     * This method yields the XPath Factory (creating it if necessary).
     * @return The XPathFactory object.
     *
     * @author <a href='mailto:intere@gmail.com'>Eric Internicola</a>
     */
    protected static synchronized XPathFactory getXPathFactory() {
        if (xpathFactory == null) {
            xpathFactory = XPathFactory.newInstance();
        }

        return xpathFactory;
    }
}