Is there any connection between these two elements of the HTML code?

Asked

Viewed 50 times

-1

I’m pulling data from a website with Jsoup but I’m not very good at html. I would like to know if there is any relationship between ".Lin-area-C2" and ".Lin-course-C3".

If there is, I’d like to know how to use it to get them into arrayList, for example, since the way I’m doing first makes Extract of ".Lin-area-C2" and after the ".Lin-course-C3" (I’d like to do it sequentially).

In general, extract a ".Lin-area-C2" and then if after having a ".Lin-course-C3", is also extracted.

Thank you!

Here the link from the website.

Document document = null;

document = Jsoup.connect("http://www.dges.gov.pt/guias/indcurso.asp?letra=E").get();

for(int contador=0;contador<document.select(".lin-area-c2").size();contador++) {
    Log.d("tag",""+ document.select(".lin-area-c2").get(contador).text());
}

for(int contador=0;contador<document.select(".lin-curso-c3").size();contador++){
    Log.d("tag",""+ document.select(".lin-curso-c3").get(contador).text());
}

1 answer

1

The box10 is the category of the course, the lin-curso is the line with course data and classes lin-curso-c1, lin-curso-c2, lin-curso-c3, lin-curso-c4 are the columns with the course information. It mounts a table using splitters instead of using a table.

  • Is there any way to select only Lin-course-C3 and Lin-area-C2?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.