An XPathFactory instance can be used to create
javax. objects.
See newInstance(String uri) for lookup mechanism.
The XPathFactory class is not thread-safe. In other words,
it is the application's responsibility to ensure that at most
one thread is using a XPathFactory object at any
given moment. Implementations are encouraged to mark methods
as synchronized to protect themselves from broken clients.
XPathFactory is not re-entrant. While one of the
newInstance methods is being invoked, applications
may not attempt to recursively invoke a newInstance method,
even from the same thread.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEFAULT_OBJECT_MODEL_URI
Default Object Model URI. |
| public static final String | DEFAULT_PROPERTY_NAME
The default property name according to the JAXP spec. |
| Access | Constructor and Description |
|---|---|
| protected | XPathFactory()
Protected constructor as |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: State of the named feature.Feature name. name)Get the state of the named feature. |
| public String | Returns: the value of the property.the property name name)Returns the value of the specified property. |
| public abstract boolean | Returns: true if XPathFactory supports objectModel, else false.Specifies the object model which the returned objectModel)XPathFactory will understand.Is specified object model supported by this |
| public static XPathFactory | Returns: A new instance of theXPathFactory builtin
system-default implementation.Creates a new instance of the |
| public static XPathFactory | Returns: Instance of anXPathFactory.Get a new |
| public static XPathFactory | Returns: Instance of anXPathFactory.Identifies the underlying object model.
The specification only defines the URI uri)DEFAULT_OBJECT_MODEL_URI,
http://java.sun.com/jaxp/xpath/dom for the W3C DOM,
the org.w3c.dom package, and implementations are free to introduce other URIs for other object models.Obtains a new |
| public static XPathFactory | Returns: New instance of aXPathFactoryIdentifies the underlying object model. The specification only defines the URI
uri, String DEFAULT_OBJECT_MODEL_URI,http://java.sun.com/jaxp/xpath/dom
for the W3C DOM, the org.w3c.dom package, and implementations are free to introduce
other URIs for other object models.fully qualified factory class name that provides implementation of factoryClassName, ClassLoader javax.xml.xpath.XPathFactory.ClassLoader used to load the factory class. If null
current Thread's context classLoader is used to load the factory class.Obtain a new instance of a |
| public abstract XPath | Returns: New instance of anXPath.Return a new |
| public abstract void | setFeature(String
Feature name. name, boolean Is feature state value)true or false.Sets a feature for this |
| public void | setProperty(String
the property name name, String the value for the property value)Sets a property for this |
| public abstract void | setXPathFunctionResolver(XPathFunctionResolver
XPath function resolver. resolver)Establish a default function resolver. |
| public abstract void | setXPathVariableResolver(XPathVariableResolver
Variable resolver. resolver)Establish a default variable resolver. |
| DEFAULT_OBJECT_MODEL_URI | back to summary |
|---|---|
| public static final String DEFAULT_OBJECT_MODEL_URI Default Object Model URI. | |
| DEFAULT_PROPERTY_NAME | back to summary |
|---|---|
| public static final String DEFAULT_PROPERTY_NAME The default property name according to the JAXP spec. | |
| XPathFactory | back to summary |
|---|---|
| protected XPathFactory() Protected constructor as | |
| getFeature | back to summary |
|---|---|
| public abstract boolean getFeature(String name) throws XPathFactoryConfigurationException Get the state of the named feature.
Feature names are fully qualified
| |
| getProperty | back to summary |
|---|---|
| public String getProperty(String name) Returns the value of the specified property. Implementation Specification The default implementation throws
| |
| isObjectModelSupported | back to summary |
|---|---|
| public abstract boolean isObjectModelSupported(String objectModel) Is specified object model supported by this
| |
| newDefaultInstance | back to summary |
|---|---|
| public static XPathFactory newDefaultInstance() Creates a new instance of the Implementation Specification The
| |
| newInstance | back to summary |
|---|---|
| public static XPathFactory newInstance() Get a new This method is functionally equivalent to: newInstance(DEFAULT_OBJECT_MODEL_URI) Since the implementation for the W3C DOM is always available, this method will never fail.
| |
| newInstance | back to summary |
|---|---|
| public static XPathFactory newInstance(final String uri) throws XPathFactoryConfigurationException Obtains a new Tip for Trouble-shooting: See http\://java.sun.com/jaxp/xpath/dom=org.acme.DomXPathFactory
| |
| newInstance | back to summary |
|---|---|
| public static XPathFactory newInstance(String uri, String factoryClassName, ClassLoader classLoader) throws XPathFactoryConfigurationException Obtain a new instance of a Tip for Trouble-shootingSetting the If you have problems try: java -Djaxp.debug=1 YourProgram ....
| |
| newXPath | back to summary |
|---|---|
| public abstract XPath newXPath() Return a new
| |
| setFeature | back to summary |
|---|---|
| public abstract void setFeature(String name, boolean value) throws XPathFactoryConfigurationException Sets a feature for this
Feature names are fully qualified
All implementations are required to support the
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, String value) Sets a property for this
A property can either be defined in this Implementation Specification The default implementation throws
| |
| setXPathFunctionResolver | back to summary |
|---|---|
| public abstract void setXPathFunctionResolver(XPathFunctionResolver resolver) Establish a default function resolver. Any A
| |
| setXPathVariableResolver | back to summary |
|---|---|
| public abstract void setXPathVariableResolver(XPathVariableResolver resolver) Establish a default variable resolver. Any A
| |