Stay organized with collections
Save and categorize content based on your preferences.
XPathFunction
interface XPathFunction
XPathFunction
provides access to XPath functions.
Functions are identified by QName and arity in XPath.
Summary
Public methods |
abstract Any! |
Evaluate the function with the specified arguments.
|
Public methods
evaluate
abstract fun evaluate(args: MutableList<Any?>!): Any!
Evaluate the function with the specified arguments.
To the greatest extent possible, side-effects should be avoided in the definition of extension functions. The implementation evaluating an XPath expression is under no obligation to call extension functions in any particular order or any particular number of times.
Parameters |
args |
MutableList<Any?>!: The arguments, null is a valid value. |
Return |
Any! |
The result of evaluating the XPath function as an Object . |
Exceptions |
javax.xml.xpath.XPathFunctionException |
If args cannot be evaluated with this XPath function. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# XPathFunction\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nXPathFunction\n=============\n\n```\ninterface XPathFunction\n```\n\n|------------------------------------|\n| [javax.xml.xpath.XPathFunction](#) |\n\n`XPathFunction` provides access to XPath functions.\n\nFunctions are identified by QName and arity in XPath.\n\nSummary\n-------\n\n| Public methods ||\n|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | [evaluate](#evaluate(kotlin.collections.MutableList))`(`args:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?\u003e!`)` Evaluate the function with the specified arguments. |\n\nPublic methods\n--------------\n\n### evaluate\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun evaluate(args: MutableList\u003cAny?\u003e!): Any!\n```\n\nEvaluate the function with the specified arguments.\n\nTo the greatest extent possible, side-effects should be avoided in the definition of extension functions. The implementation evaluating an XPath expression is under no obligation to call extension functions in any particular order or any particular number of times.\n\n| Parameters ||\n|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `args` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?\\\u003e!: The arguments, `null` is a valid value. |\n\n| Return ||\n|-----------------------------------------------------------------------------|---------------------------------------------------------------|\n| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)! | The result of evaluating the `XPath` function as an `Object`. |\n\n| Exceptions ||\n|------------------------------------------|-----------------------------------------------------------|\n| `javax.xml.xpath.XPathFunctionException` | If `args` cannot be evaluated with this `XPath` function. |"]]