Most visited

Recently visited

Added in API level 8

XPathVariableResolver

public interface XPathVariableResolver

javax.xml.xpath.XPathVariableResolver


XPathVariableResolver提供对用户定义的XPath变量集的访问。

XPathVariableResolver和XPath评估程序必须遵守无法由API直接执行的合同。 尽管变量可能是可变的,也就是说,应用程序可能希望在不同的变量值下多次计算相同的XPath表达式,但在评估任何单个XPath表达式时,变量的值必须是不可变的。

Summary

Public methods

abstract Object resolveVariable(QName variableName)

在一组可用变量中查找一个变量。

Public methods

resolveVariable

Added in API level 8
Object resolveVariable (QName variableName)

在一组可用变量中查找一个变量。

如果 variableNamenull ,则引发 NullPointerException

Parameters
variableName QName: The QName of the variable name.
Returns
Object The variables value, or null if no variable named variableName exists. The value returned must be of a type appropriate for the underlying object model.
Throws
NullPointerException If variableName is null.

Hooray!