code: public static XPathFactory newInstance(String uri, String factoryClassName,
              ClassLoader classLoader) throws XPathFactoryConfigurationException {
          if (uri == null) {
              throw new NullPointerException("uri == null");
          }
          if (uri.length() == 0) {
              throw new IllegalArgumentException(
                  "XPathFactory#newInstance(String uri) cannot be called with uri == \"\""
              );
          }
          if (factoryClassName == null) {
              throw new XPathFactoryConfigurationException("factoryClassName cannot be null.");
          }
          if (classLoader == null) {
              classLoader = Thread.currentThread().getContextClassLoader();
          }
          XPathFactory xpathFactory = new XPathFactoryFinder(classLoader).createInstance(factoryClassName);
          if (xpathFactory == null || !xpathFactory.isObjectModelSupported(uri)) {
              throw new XPathFactoryConfigurationException(
                  "No XPathFactory implementation found for the object model: "
                  + uri
              );
          }
          return xpathFactory;
      }
docs: @return Instance of an <code>XPathFactory</code>.
  
  @throws XPathFactoryConfigurationException If the specified object model is unavailable.
  @throws NullPointerException If <code>uri</code> is <code>null</code>.
  @throws IllegalArgumentException If <code>uri.length() == 0</code>.