Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extracting text from html using htmlparser

 
dhriti joshi
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic