Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Translating HTML pages into Java Objects

 
Master Rice
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're in the wrong forum. Try 'XML, XSL, DOM and SAX'
 
DAYANAND BURAMSHETTY
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
//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");
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic