This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 41599
    
  55
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Extracting text from html using htmlparser