XPath - select text after certain node

后端 未结 1 851
星月不相逢
星月不相逢 2020-12-08 10:00

I have found a node, now i need to select sibling text after it:

\"enter

In my

相关标签:
1条回答
  • 2020-12-08 10:44

    Try this:

    //foo/following-sibling::text()[1]

    (replace //foo/ with your current XPath expression.

    With this XML:

    <data>
    <foo>foo</foo>
    bar
    <baz>baz</baz>
    </data>
    

    it gives bar as output.

    0 讨论(0)
提交回复
热议问题