XPath selecting multiple elements with predicates

前端 未结 3 1626
小蘑菇
小蘑菇 2021-01-04 11:26

I have an XPath query which is doing what I want, namely selecting a union of \'surname\' & \'given-names\' with the given predicates (It\'s actually either/or that I ne

3条回答
  •  悲&欢浪女
    2021-01-04 12:22

    How about

    /header/authors/*[(name() = "surname" or name()="given-names") and ./text() and @id='1'] 
    

提交回复
热议问题