I want to implement a search example, used

String str = "заг"; Elements elements = document.select("tbody>tr>a[title*="+str+"]" ); 

With

 <a href="http://сайт.com/30.html" title="заголовок"> 

How to implement it when

  <td style="padding-left:10px; padding-right:10px;" align="justify">заголовок <a href="news_add.php?id=857">подробнее...</a> </td> 

And another question, tell me the other day I want to get into the api, tell me the methods. While I know I can use it with JSON

  • Rephrase, pzh-that question. Almost nothing is clear. - Yuriy SPb
  • Specify exactly what you need to get. - Yuriy SPb
  • @YuriSPb, the text is sent to the string through the edittext or the search module in the interface in String str and it leaves the results only where there is a keyword you wrote. So I was looking for information, but now another site and here is the problem - Artem
  • You need to find links that have "more"? .. - Yuriy SPb
  • @YuriySPb, no, the same thing (title) only now the text for> - Artem

1 answer 1

Try this with :contains(textToFind) :

 Elements elements = document.select( "td>a:contains("+str+")" );