XPath 逻辑表达式

问题描述

我有一个简单的表达:

*[local-name() = 'test' and namespace-uri() = 'test1' or namespace-uri() = 'test2']"

这类似于:

 (x and y) or z

如何创建以下表达式:

x and (y or z)

我使用的是 XPath 2.0

解决方法

试试:

*[local-name() = 'test' and (namespace-uri() = 'test1' or namespace-uri() = 'test2')]"

*[local-name() = 'test' and namespace-uri() = ('test1','test2')]"

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...