| 程序包 | 说明 |
|---|---|
| org.seimicrawler.xpath.core.function | |
| org.seimicrawler.xpath.util |
| 限定符和类型 | 类和说明 |
|---|---|
class |
Concat
Function: string concat(string, string, string*)
The concat function returns the concatenation of its arguments.
|
class |
Contains
Function: boolean contains(string, string)
The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.
|
class |
Count
Function: number count(node-set)
The count function returns the number of nodes in the argument node-set.
|
class |
First
first in xpath is 1
|
class |
Last
Function: number last()
The last function returns a number equal to the context size from the expression evaluation context.
|
class |
Not
bool not(bool)
|
class |
Position
The position function returns a number equal to the context position from the expression evaluation context.
|
class |
StartsWith
Function: boolean starts-with(string, string)
The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false.
|
class |
StringLength
number string-length(string?)
|
class |
SubString
Function: string substring(string, number, number?)
|
class |
SubStringAfter
Function: string substring-after(string, string)
The substring-after function returns the substring of the first argument string that follows
the first occurrence of the second argument string in the first argument string, or the empty string if
the first argument string does not contain the second argument string.
|
class |
SubStringBefore
Function: string substring-before(string, string)
The substring-before function returns the substring of the first argument string that precedes the
first occurrence of the second argument string in the first argument string, or the empty string
if the first argument string does not contain the second argument string.
|
class |
SubStringEx
JsoupXpath扩展函数(统一使用 ‘jx’ 域),保持使用习惯java开发者习惯相同,第一个数字为起始索引(且索引从0开始),第二个数字为结束索引
StringUtils.substring(null, *, *) = null
StringUtils.substring("", * , *) = "";
StringUtils.substring("abc", 0, 2) = "ab"
StringUtils.substring("abc", 2, 0) = ""
StringUtils.substring("abc", 2, 4) = "c"
StringUtils.substring("abc", 2.13, 3.7) = "c"
StringUtils.substring("abc", 4, 6) = ""
StringUtils.substring("abc", 2, 2) = ""
StringUtils.substring("abc", -2, -1) = "b"
StringUtils.substring("abc", -4, 2) = "ab"
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Function |
Scanner.findFunctionByName(java.lang.String funcName) |
Copyright © 2018. All Rights Reserved.