javax.xml.xpath
Class XPathFactory
java.lang.Object
javax.xml.xpath.XPathFactory
public abstract class XPathFactory
extends java.lang.Object
Factory for creating XPath environments.
- 1.3
DEFAULT_OBJECT_MODEL_URI
public static final String DEFAULT_OBJECT_MODEL_URI
The default object model URI.
DEFAULT_PROPERTY_NAME
public static final String DEFAULT_PROPERTY_NAME
The default property name according to the JAXP specification.
XPathFactory
protected XPathFactory()
isObjectModelSupported
public boolean isObjectModelSupported(String objectModel)
Indicates whether the specified object model URI is supported by
this factory.
newInstance
public static final XPathFactory newInstance()
Returns a new factory for the default (DOM) object model.
newInstance
public static final XPathFactory newInstance(String uri)
throws XPathFactoryConfigurationException
Returns a new factory for the given object model URI.
The implementation class to load is the first found in the following
locations that advertises support for the given model URI:
- the
javax.xml.xpath.XPathFactory
system property
- the above named property value in the
$JAVA_HOME/lib/jaxp.properties
file
- the class name specified in the
META-INF/services/javax.xml.xpath.XPathFactory
system
resource
- the default factory class
uri
- the object model URI
newXPath
public XPath newXPath()
Returns a new XPath evaluation environment.
setXPathFunctionResolver
public void setXPathFunctionResolver(XPathFunctionResolver resolver)
Sets the XPath extension function resolver calback.
setXPathVariableResolver
public void setXPathVariableResolver(XPathVariableResolver resolver)
Sets the XPath variable resolver calback.