No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.
javax.xml.xpath

Interface XPath

    • Method Detail

      • reset

        void reset()

        Reset this XPath to its original configuration.

        XPath is reset to the same state as when it was created with XPathFactory.newXPath(). reset() is designed to allow the reuse of existing XPaths thus saving resources associated with the creation of new XPaths.

        The reset XPath is not guaranteed to have the same XPathFunctionResolver, XPathVariableResolver or NamespaceContext Objects, e.g. Object.equals(Object obj). It is guaranteed to have a functionally equal XPathFunctionResolver, XPathVariableResolver and NamespaceContext.

      • setXPathVariableResolver

        void setXPathVariableResolver(XPathVariableResolver resolver)

        Establish a variable resolver.

        A NullPointerException is thrown if resolver is null.

        Parameters:
        resolver - Variable resolver.
        Throws:
        NullPointerException - If resolver is null.
      • getXPathVariableResolver

        XPathVariableResolver getXPathVariableResolver()

        Return the current variable resolver.

        null is returned in no variable resolver is in effect.

        Returns:
        Current variable resolver.
      • setXPathFunctionResolver

        void setXPathFunctionResolver(XPathFunctionResolver resolver)

        Establish a function resolver.

        A NullPointerException is thrown if resolver is null.

        Parameters:
        resolver - XPath function resolver.
        Throws:
        NullPointerException - If resolver is null.
      • getXPathFunctionResolver

        XPathFunctionResolver getXPathFunctionResolver()

        Return the current function resolver.

        null is returned in no function resolver is in effect.

        Returns:
        Current function resolver.
      • setNamespaceContext

        void setNamespaceContext(NamespaceContext nsContext)

        Establish a namespace context.

        A NullPointerException is thrown if nsContext is null.

        Parameters:
        nsContext - Namespace context to use.
        Throws:
        NullPointerException - If nsContext is null.
      • getNamespaceContext

        NamespaceContext getNamespaceContext()

        Return the current namespace context.

        null is returned in no namespace context is in effect.

        Returns:
        Current Namespace context.
      • evaluate

        Object evaluate(String expression,
                      Object item,
                      QName returnType)
                        throws XPathExpressionException

        Evaluate an XPath expression in the specified context and return the result as the specified type.

        See Evaluation of XPath Expressions for context item evaluation, variable, function and QName resolution and return type conversion.

        If returnType is not one of the types defined in XPathConstants ( NUMBER, STRING, BOOLEAN, NODE or NODESET) then an IllegalArgumentException is thrown.

        If a null value is provided for item, an empty document will be used for the context. If expression or returnType is null, then a NullPointerException is thrown.

        Parameters:
        expression - The XPath expression.
        item - The starting context (a node, for example).
        returnType - The desired return type.
        Returns:
        Result of evaluating an XPath expression as an Object of returnType.
        Throws:
        XPathExpressionException - If expression cannot be evaluated.
        IllegalArgumentException - If returnType is not one of the types defined in XPathConstants.
        NullPointerException - If expression or returnType is null.
Error Infobrol

Can not display this page of the Infobrol website

Type of error (18-01)

Unknown format specifier "&"

Please try again in a few minutes…

Return to the home page




Steph