Select on multiple criteria with XPath

后端 未结 3 1521
时光取名叫无心
时光取名叫无心 2020-12-17 08:46

I have an XML document which looks something like this:


 
  MENSWEAR 
  

        
3条回答
  •  感情败类
    2020-12-17 09:02

    You just need to have the anded list of conditions inside the [ ] selector for record:

    /meadinkent/record[compdiv[.='MENSWEAR'] and sty_ret_type[.='ACCESSORIES']]
    

    Reads as: under a top level meadinkent node, a record node, having a child compdiv (with value MENSWEAR) and a child sty_ret_rype (with value ACCESSORIES).

提交回复
热议问题