L
L
lcd12322016-08-06 20:14:33
HTML
lcd1232, 2016-08-06 20:14:33

How to get the line after br in Xpath?

There is html like

<td>
  Tax Year
  <br>
  2016
</td>

You need to get the text "2016". How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lcd1232, 2016-08-06
@lcd1232

Found the answer. The query comes out like this:
.//td/text()[preceding-sibling::br]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question