aspose file tools*
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
Author

Translating HTML pages into Java Objects

Master Rice
Greenhorn

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'
DAYANAND BURAMSHETTY
Ranch Hand

Joined: Aug 06, 2001
Posts: 34
//This is html page
<Html>
<from action="/servlet/xyz">
<input type="text" name="USERID">
</form>
</html>
//servlet
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Translating HTML pages into Java Objects