Java XPath Create newXPathFactory()

Here you can find the source of newXPathFactory()

Description

new X Path Factory

License

Apache License

Declaration

public static XPathFactory newXPathFactory() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.xml.xpath.*;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class Main {
    private static final Lock factoryLock = new ReentrantLock();

    public static XPathFactory newXPathFactory() {
        factoryLock.lock();/* w w  w . j  av  a2 s  .  co m*/
        try {
            return XPathFactory.newInstance();
        } finally {
            factoryLock.unlock();
        }
    }
}

Related

  1. getXpathVal(InputStream pInputStream, String pXPath)
  2. getXPathValue(XPath xpath, Node d, String xq, String def)
  3. newXPath()
  4. newXPath()
  5. newXpathExpression(final XPath xpath, final String expression)
  6. xPath()
  7. xpath()
  8. xpath(String expression)
  9. xpath(String xml, String xpath)