## org.apache.xpath.jaxp
Class XPathFactoryImpl

    java.lang.Object
      |
      +--javax.xml.xpath.XPathFactory
            |
            +--org.apache.xpath.jaxp.XPathFactoryImpl

public class XPathFactoryImpl
extends XPathFactory

The XPathFactory builds XPaths.

Fields inherited from class javax.xml.xpath.XPathFactory
`DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME`

Constructor Summary
`XPathFactoryImpl()`

Method Summary
`boolean` `getFeature(java.lang.String name)` Get the state of the named feature.
`boolean` `isObjectModelSupported(java.lang.String objectModel)` Is specified object model supported by this `XPathFactory`?
`XPath` `newXPath()` Returns a new `XPath` object using the underlying object model determined when the factory was instantiated.
`void` `setFeature(java.lang.String name, boolean value)` Set a feature for this `XPathFactory` and `XPath`s created by this factory.
`void` `setXPathFunctionResolver(XPathFunctionResolver resolver)` Establish a default function resolver.
`void` `setXPathVariableResolver(XPathVariableResolver resolver)` Establish a default variable resolver.

Methods inherited from class javax.xml.xpath.XPathFactory
`newInstance, newInstance`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XPathFactoryImpl

    public XPathFactoryImpl()

Method Detail

### isObjectModelSupported

    public boolean isObjectModelSupported(java.lang.String objectModel)

  Is specified object model supported by this `XPathFactory`?

  Parameters:
    `objectModel` - Specifies the object model which the returned `XPathFactory` will understand.
  Returns:
    `true` if `XPathFactory` supports `objectModel`, else `false`.
  Throws:
    java.lang.NullPointerException - If `objectModel` is `null`.
    java.lang.IllegalArgumentException - If `objectModel.length() == 0`.
  Overrides:
    isObjectModelSupported in class XPathFactory

### newXPath

    public XPath newXPath()

  Returns a new `XPath` object using the underlying object model determined when the factory was instantiated.

  Returns:
    New `XPath`
  Overrides:
    newXPath in class XPathFactory

### setFeature

    public void setFeature(java.lang.String name,
                           boolean value)
                    throws XPathFactoryConfigurationException

  Set a feature for this `XPathFactory` and `XPath`s created by this factory.

  Feature names are fully qualified `java.net.URI`s. Implementations may define their own features. An `XPathFactoryConfigurationException` is thrown if this `XPathFactory` or the `XPath`s it creates cannot support the feature. It is possible for an `XPathFactory` to expose a feature value but be unable to change its state.

  See `XPathFactory` for full documentation of specific features.

  Parameters:
    `name` - Feature name.
    `value` - Is feature state `true` or `false`.
  Throws:
    XPathFactoryConfigurationException - if this `XPathFactory` or the `XPath`s it creates cannot support this feature.
    java.lang.NullPointerException - if `name` is `null`.
  Overrides:
    setFeature in class XPathFactory

### getFeature

    public boolean getFeature(java.lang.String name)
                       throws XPathFactoryConfigurationException

  Get the state of the named feature.

  Feature names are fully qualified `java.net.URI`s. Implementations may define their own features. An `XPathFactoryConfigurationException` is thrown if this `XPathFactory` or the `XPath`s it creates cannot support the feature. It is possible for an `XPathFactory` to expose a feature value but be unable to change its state.

  Parameters:
    `name` - Feature name.
  Returns:
    State of the named feature.
  Throws:
    XPathFactoryConfigurationException - if this `XPathFactory` or the `XPath`s it creates cannot support this feature.
    java.lang.NullPointerException - if `name` is `null`.
  Overrides:
    getFeature in class XPathFactory

### setXPathFunctionResolver

    public void setXPathFunctionResolver(XPathFunctionResolver resolver)

  Establish a default function resolver.

  Any `XPath` objects constructed from this factory will use the specified resolver by default.

  A `NullPointerException` is thrown if `resolver` is `null`.

  Parameters:
    `resolver` - XPath function resolver.
  Throws:
    java.lang.NullPointerException - If `resolver` is `null`.
  Overrides:
    setXPathFunctionResolver in class XPathFactory

### setXPathVariableResolver

    public void setXPathVariableResolver(XPathVariableResolver resolver)

  Establish a default variable resolver.

  Any `XPath` objects constructed from this factory will use the specified resolver by default.

  A `NullPointerException` is thrown if `resolver` is `null`.

  Parameters:
    `resolver` - Variable resolver.
  Throws:
    java.lang.NullPointerException - If `resolver` is `null`.
  Overrides:
    setXPathVariableResolver in class XPathFactory

Copyright © 2006 Apache XML Project. All Rights Reserved.