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 4012980
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:18:52+00:00 2026-05-20T09:18:52+00:00

lets say i have a list of urls such as http://stackexchange.com https://stackoverflow.com/users/login http://careers.stackoverflow.com http://chat.stackoverflow.com

  • 0

lets say i have a list of urls such as

http://stackexchange.com
https://stackoverflow.com/users/login
http://careers.stackoverflow.com
http://chat.stackoverflow.com
http://meta.stackoverflow.com
https://stackoverflow.com/about

this list is in a text file.

now i would like to process all the urls in one go. The below coding is the processor.

String sourceUrlString="http://stackexchange.com";
    if (args.length==0)
      System.err.println("Using default argument of \""+sourceUrlString+'"');
    else
        sourceUrlString=args[0];
    if (sourceUrlString.indexOf(':')==-1) sourceUrlString="file:"+sourceUrlString;
    Source source=new Source(new URL(sourceUrlString));
    String renderedText=source.getRenderer().toString();
    System.out.println("\nSimple rendering of the HTML document:\n");
    System.out.println(renderedText);

as you see, the coding above only can process one url at one time where i must manually key in the url at the sourceurlstring. How do i process all of the urls in the text file in one go ?

  • 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-05-20T09:18:53+00:00Added an answer on May 20, 2026 at 9:18 am
    • Learn what methods are by reading this part of the Java tutorial.
    • Implement a method taking one URL as argument and processing it.
    • Learn how to read a text file by reading this part of the Java tutorial.
    • Implement a method to read the text file line by line, and call your first method for each line read in the file.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have an entity Foo, and it contains a list of another
Hey, Lets say we have a query which generates list of city names as
Let's say we have a grails web application exposing several resources. tags urls users
lets say I have a list like so: ['one','two','three','four','five','six','seven','eight','nine'] and I want to experiment
Lets say I have a list of links: <a id="home" href="#"> home link </a><br/>
Let's say I have a list of categories for navigation on a web app.
Let's say I have a List object and an iterator for that list. Now
Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers>
I have a list of objects (for the sake of example, let's say 5).
Another easy one hopefully. Let's say I have a collection like this: List<DateTime> allDates;

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.