开发者

xpath: how to select all text nodes that precedes or follows <br> tags ? possible for \n?

text<br>
text2<br>
text3<br/>

br tags may be self closing or not.

would it be possible for a regular text:

开发者_如何学Ctext\n
text2\n
text3\n


you can give:

//br/preceding-sibling::*/text()

where //br will select all the breaks in the document

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜