File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Translating HTML pages into Java Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Translating HTML pages into Java Objects" Watch "Translating HTML pages into Java Objects" New topic

Translating HTML pages into Java Objects

Master Rice

Joined: Aug 05, 2001
Posts: 8
I am a relatively new programmer who is trying to write an application that parses/retrieves information from an HTML page, and extracts relevant parts of the HTML (usually from tables) into Java Strings.
I have heard of javax.swing.text.html.parser. Would this do the job, and if so, can somebody give me some pointers on how to use it. Some simple sample code would be useful, just so that I can work out how to use it.
Thanks, Neil.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
You're in the wrong forum. Try 'XML, XSL, DOM and SAX'
Ranch Hand

Joined: Aug 06, 2001
Posts: 34
//This is html page
<from action="/servlet/xyz">
<input type="text" name="USERID">
public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException,ServletException{
//This userid getting from html page
String userId=req.getParameter("USERID");

Dil se....,<BR>Dayanand<BR>0065-8839071(off)<BR>0065-7547034(Res0
I agree. Here's the link:
subject: Translating HTML pages into Java Objects
It's not a secret anymore!