You can put all that into a single selector
Example:
// html is your posted html code here, you can connect to a website too.
final String html = ...
Document doc = Jsoup.parse(html); // Parse into document
// Select the element and print it
for( Element element : doc.select("td:contains(Ulica:) ~ td") )
{
System.out.println(element);
}
Explanation:
td:contains(Ulica:) ~ td
: Selects td
elements with text Ulicia
, and takes the next sibling element that's a td
.
Output:
<td class="Value"><span id="ctl00_RightContentPlaceholder_lbAregStreet">**THIS**</span></td>
Now you can get the values you need form that element.