1

我有以下代码:

root="//valueExpression[matches(self::*,'pattern')]/.."

但是我只能使用 XPath 1.0,并且我得到了函数 matches() 的异常。您能帮我解决只使用 XPath 1.0 中的函数的解决方案吗?

4

1 回答 1

0

通常,这不能仅使用 XPath 1.0 来完成

但是,有一组标准 XPath 1.0 函数可用于字符串处理:

  • substring()
  • substring-before()
  • substring-after()
  • translate()
  • normalize-space()
  • string-length()
  • count()
于 2010-06-17T18:09:59.943 回答