Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:24:09+00:00 2026-06-10T20:24:09+00:00

I am using Jsoup. I do a get document= connect.get(); and get the html

  • 0

I am using Jsoup.
I do a get document= connect.get(); and get the html page.

now I write that to a text(string).

I have users who populate these pages.
I know each user name . These pages have the username.
I am able to do a string.contains(“username”) to check if the user is present or not.

Now my issue is:
I have users with there names in

Tables

ordered lists

unordered lists

in Body

But in all these cases they have in format as:Example

<li><a href="http://university.xxx.students.com/grade9/john/117429">2012 academic record</a></li>

some are in table and all..

In the example I know the student name = john.
how can I get all the urls?

==

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:24:10+00:00Added an answer on June 10, 2026 at 8:24 pm

    How about this:

        Document doc = Jsoup.connect(url).get();
        Elements links = doc.select("a[href]");
    
        for (Element link : links) {
            if(link.attr("abs:href").contains(studentName) || link.text().contains(studentName)){
                studentLinkList.add(link.attr("abs:href"));
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a swing application that read HTML pages using the following command String
How do i get this text from the following html code using Jsoup? <h2
I have the following code that extracts urls from a given page using jsoup.
I am using JSoup to parse a gb2312 charset page: http://vars.sinaapp.com/u/t/jsoup_output_encoding_issue.html source code: String
Im using JSoup to parse HTML response. I have multiple Div tags. I have
After I made many changes to the HTML document using JSoup so what I
Document doc = Jsoup.connect(studentprofiles).get(); Element tables = doc.select(table); Elements myTdsstudent = tables.select(tr td:eq(1)); I
Document doc = Jsoup.connect(http://reviews.opentable.com/0938/9/reviews.htm).get(); Element part = doc.body(); Elements parts = part.getElementsByTag(span); String attValue;
I am currently using Jsoup to parse HTML document and I use the following
I'm executing this code: //doc = Jsoup.connect(data[0].getURL()).get(); Document doc = Jsoup.connect(url).post(); and am getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.