• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Translating HTML pages into Java Objects

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're in the wrong forum. Try 'XML, XSL, DOM and SAX'
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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");
}
 
reply
    Bookmark Topic Watch Topic
  • New Topic