我想实现使用XPath以下,但我不能选择工作.....Xpath的多个过滤器中选择
我有以下情形:
性别男性或女性 名优产品:品牌A或品牌B或BrandC或BrandD
我想选择所有的男性只有品牌A,品牌B属性和BrandC
如果我用下面的;
/node[gender[1] = "male"] (perfect selects only the male products)
/node[gender[1] = "male" and brand[1][contains(.,"BrandA")]](perfect Xpath selects only the male products with the BrandA)
到目前为止好,但如果我用站立下方是不会选择任何....
/node[gender[1] = "male" and brand[1][contains(.,"BrandA")] and brand[1][contains(.,"BrandB")]]
有什么建议?我究竟做错了什么?
谢谢!
你可以显示你的示例XML摘录? – Rao