I wanted to extract info between html tags .
for eg
<div>
	 <br>
		 love to marry is an free matrimonial website
	 </br>
	 <div id='first'>
		 Search for your partner ends here.
	 </div>
	 <div class="test">
		 love to marry will let you know what kanyadaan means
		</div>
<span>
Provide your ads on our website at very cheap rate
</span>
	<div id="second">
	 Mangal sutra bandhan is an hindu ritual where groom .. to read more please visit
http://lovetomarry.com/ritual
<table>
<tr>
		<td>mangal sutra bandhan information</td>
		<td>Find your partner for free </td>
</tr>
<tr>
		<td>send your love sms at
http://lovetomarry.com and win exciting prizes </td>
		<td>Get your horoscope built from love to marry , to know more about your future your future enroll our website </td>
</tr>
</table>
	 <div>
	 Watch latest online movies for free
	 </div>
	
	 Get your daily, weekly, monthly,yearly	Horoscop
e for free only on lovetomarry.com
	</div>
</div>
########### o/p ##############
if request is for "BR" tags
love to marry is an free matrimonial website
if request is for "DIV" tags w.r.t id "first"
Search for your partner ends here.
if request is for "DIV" tags w.r.t class "test"
love to marry will let you know what kanyadaan means.
if request is for "SPAN"
Provide your ads on our website at very cheap rate
if request is for "DIV" tags w.r.t id "Second"
	 Mangal sutra bandhan is an hindu ritual where groom .. to read more please visit
http://lovetomarry.com/ritual
	 mangal sutra bandhan information
	 Find your partner for free
	 send your love sms at
http://lovetomarry.com and win exciting prizes
	 Get your horoscope built from love to marry , to know more about your future your future enroll our website
	
	 Watch latest online movies for free
	 Get your daily, weekly, monthly,yearly	Horoscop
e for free only on lovetomarry.com
###################o/p####
##########
##########
########&#
9;
If request is for "DIV" tags w.r.t id "Second"
over here i want to exclude table but if it contains some other html tags then i have to maintain the text with there respective tags.
extraction of data within the html tags may be with "id","class" or without there attributes.
i have extracted data between tags w.r.t id but it fails if it has some other div in between
Open in new window