Hello all. I am currently using jsoup css selector for scraping web pages, but I am unsure of how to extract the text between two tags. Here is an example:
<html>
<body>
<a
name = "xxx" >
some text here</a>
<a
name = "abc">
the text 1 </a
>`
I am interested in extracting the text here
<a
name = "cde">
the text 1 </a>
</body>
</html>
The attribute 'name' of <a>
is unique within the HTML document.
I have come across solutions that involve extracting text between <a>
and </a>
tags, but I need a different approach. Can anyone help me with this? Thank you very much!