wood burning stoves*
The moose likes Other Java Products and Servers and the fly likes Extracting text from html using htmlparser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Extracting text from html using htmlparser" Watch "Extracting text from html using htmlparser" New topic
Author

Extracting text from html using htmlparser

dhriti joshi
Ranch Hand

Joined: Aug 13, 2002
Posts: 82
I have an html from which I want to etract an included html,to mark the html I have put a starting and an end tag say <here> and </here>.
how do I exract all the text in between this html.

example is
<html>
<head>
<here>
abc
<div>def<div>
</here>
</head>
</html>

how do I extract string "abcdef",using the HTML parser.

Thanks in advance,
Dhriti.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42279
    
  64
What do you mean by "the HTML parser" - this one http://htmlparser.sourceforge.net/? If so, then there are several sample programs on the web site that should get you started; StringExtractor in particular looks promising.


Ping & DNS - my free Android networking tools app
 
Consider Paul's rocket mass heater.
 
subject: Extracting text from html using htmlparser