android - Ignore whole class if subclass contains unwanted value with jsoup -


i in activity:

document doc = jsoup.connect(https://greselius.net/idesk/vplan/anzeige/schueler_heute/subst_001.htm).get(                 );                 elements questions = doc.select("table.mon_list");                 elements td = questions.select("td.list:not(.inline_header)"); 

the website connects substitute teacher plan. gets me elements contain data of affected school class, lesson, teacher, etc. gets school classes , want elements 1 specific school class. lets want ones contain 9c, how can ignore other ones?

<tr class="list odd"> <td class="list" align="center">9c</td><td class="list" align="center">5</td><td class="list" align="center">lÜb</td><td class="list" align="center">ph</td><td class="list" align="center">ph1</td><td class="list" align="center">lÜb</td><td class="list" align="center">raum-vtr.</td><td class="list" align="center">&nbsp;</td> </tr> 

depending on desired scope of search, want 1 of :contains(), :containsown(), :matches() , :matchesown() selectors.

to select table cells in table rows containing 9c, you'd use tr:contains(9c) td; note while selector applied tr, child elements searched. if instead used td:contains(9c), you'd single cell, not siblings in row (though iterate on returned elements' siblings, of course).

try.jsoup.org can't fetch url provided due certificate error, can't give exact query need, should started.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -