如何在mule-xpath中添加2个表达式



我想做两次检查。我在下面这样做

#[xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorCode/text() = '200' & 
xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorDescription/text() = 'Invalid Login']

它会像一样清除错误

意外的'&xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorDescription/text()="无效登录"(org.jaxen.saxpath.XPathSyntaxException)org.jaxen.saxpath.base.XPathReader:1084(null)

请告诉我如何在一个表达式中添加两个检查?

尝试以下操作:-

#[xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorCode/text() = '200' and
xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorDescription/text() = 'Invalid Login']

更新:-您需要使用&&进行编码。。。在表达式中使用&&而不是&&
所以你的表达是:-

#[xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorCode/text() = '200' &&
    xpath:/ns0:UpdateUserResponse/ns0:ErrorReport/ns0:ErrorDescription/text() = 'Invalid Login']

最新更新