Xpath - get only node content without other elements

后端 未结 4 1980
暖寄归人
暖寄归人 2020-12-14 06:20

I have an div elemet:

This is some text

This is a title

Some other content
<
4条回答
  •  忘掉有多难
    2020-12-14 06:35

    You can use this XPath expression:

    ./div[1]/text()[1]
    

    to test, I use this online tester : http://xpather.com/

提交回复
热议问题