Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下代码:
root="//valueExpression[matches(self::*,'pattern')]/.."
但是我只能使用 XPath 1.0,并且我得到了函数 matches() 的异常。您能帮我解决只使用 XPath 1.0 中的函数的解决方案吗?
通常,这不能仅使用 XPath 1.0 来完成。
但是,有一组标准 XPath 1.0 函数可用于字符串处理:
substring()
substring-before()
substring-after()
translate()
normalize-space()
string-length()
count()