Hi, I want to do program that reads different news sites and lists headlines. How this should be done? How to read the data from the web sites?

Recommended Answers

All 2 Replies

I assume most of the sites you are talking about support HTTP. There are some classes in Java SE that would be useful for getting the HTML pages from the sites: HttpURLConnection
and there are packages and classes from Apache that would help you.

After reading the HTML you will want to format the HTML. The JEditorPane class will do some of that.

there is a java library for that. Jsoup --> http://jsoup.org/ u can use that link. i remember for taking names (string variables actually) with jsoup .get() like something.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.