XPath / XQuery: find text in a node, but ignoring content of specific descendant elements

前端 未结 4 1731
星月不相逢
星月不相逢 2021-02-05 18:36

I am trying to find a way to search for a string within nodes, but excluding ythe content of some subelements of those nodes. Plain and simple, I want to search for a string in

4条回答
  •  囚心锁ツ
    2021-02-05 19:08

    For the record, as a complement to the other answers, I've found this workaround that also seems to do the job:

    //p[contains(child::text()|not(descendant::footnote), "text")]
    

提交回复
热议问题