This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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: 41089
    
  44
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
 
wood burning stoves
 
subject: Extracting text from html using htmlparser
 
Similar Threads
JEditorPane HTML parsing problem with about CSS
Speed up Application Created USing Servlets and JSP
using CSS float attribute makes things 'leak' out of their containers ?
CSS Positioning Issue
creating button using <s:button> - similar to the CSS based button