Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I wan to retrive the content of the another site...

i have a page like following :
from the following page i want to retrive the <span> value and <table> values;
Please help me .....

<div class="pnl490M">
<div class="ciPlayernametxt" style="">
<div style="margin: 0pt; float: left; padding-bottom: 3px;">
<h1>MS Dhoni<a href="/rss/content/story/feeds/28081.rss" id="rssIcon" alt="MS Dhoni RSS Feed" title="Mahendra Singh Dhoni RSS Feed" style="padding: 1px 0pt 0pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>

</h1>
<h3 class="PlayersSearchLink"><b>India</b></h3>
</div>

</div>

<div style="float: left; display: table-cell; margin-bottom: 10px;">
<div style="float: left; width: 310px; color: rgb(102, 102, 102); font-size: 11px;">
<p class="ciPlayerinformationtxt"><b>Full name</b>
<span>Mahendra Singh Dhoni</span></p>
<p class="ciPlayerinformationtxt"><b>Born</b>
<span>
July 7, 1981, Ranchi </span></p>
<p class="ciPlayerinformationtxt"><b>Current age</b> <span>28 years 331 days</span></p>

<p class="ciPlayerinformationtxt"><b>Major teams</b> <span style="white-space: nowrap;">India,</span> <span style="white-space: nowrap;">Asia XI,</span> <span style="white-space: nowrap;">Bihar,</span> <span style="white-space: nowrap;">Chennai Super Kings,</span> <span style="white-space: nowrap;">Jharkhand</span></p>
<p class="ciPlayerinformationtxt"><b>Also known as</b> <span>Mahi</span></p>

<p class="ciPlayerinformationtxt"><b>Batting style</b> <span>Right-hand bat</span></p>
<p class="ciPlayerinformationtxt"><b>Bowling style</b> <span>Right-arm medium</span></p>
<p class="ciPlayerinformationtxt"><b>Fielding position</b> <span>Wicketkeeper</span></p>

<script type="text/javascript">
$(document).ready(function(){
fixIframe();
function fixIframe(){
$('.FB_ElementReady iframe').css({'height':'30px','width':'300px'});
if($('.FB_ElementReady iframe').height()>38 || $('.FB_ElementReady iframe').height()==0 || $('.FB_ElementReady iframe').height()== null){
window.setTimeout(fixIframe,1300);
}
}
});
</script>

<!--iframe id="fbLike" scrolling="no" frameborder="0" src="http://www.facebook.com/widgets/like.php?href=http://www.cricinfo.com/india/content/player/28081.html&height=30&width=310" allowtransparency="true" name="fbLike" style="width: 310px; height: 27px; border: medium none;"></iframe-->
<fb:like class="fb_edge_widget_with_comment fb_iframe_widget" width="310" height="27" show_faces="false" href="http://www.cricinfo.com/india/content/player/28081.html" layout="box"><span><iframe src="http://www.facebook.com/plugins/like.php?api_key=260890547115&amp;channel_url=http%3A%2F%2Fwww.cricinfo.com%2Findia%2Fcontent%2Fplayer%2F28081.html%3Ffb_xd_fragment%23%3F%3D%26cb%3Df3b9737202d1a22%26relation%3Dparent.parent%26transport%3Dfragment&amp;href=http%3A%2F%2Fwww.cricinfo.com%2Findia%2Fcontent%2Fplayer%2F28081.html&amp;layout=standard&amp;locale=en_US&amp;node_type=link&amp;sdk=joey&amp;show_faces=false&amp;width=310" style="border: medium none ; overflow: hidden; height: 23px; width: 310px;" name="f74194f9b8a962" id="f98d73dea926ca"></iframe></span></fb:like>
</div>

Thanks
Posted

1 solution

This is called Data Scraping

You can check following example.

http://www.codersource.net/microsoft-net/c-advanced/html-screen-scraping-in-c.aspx[^]
 
Share this answer
 
Comments
vinay1234567890 3-Jun-10 8:32am    
Hello sir,
i want to extract the value which r in tag ..
i need a regular exresssion for thease line like
Full name
Mahendra Singh Dhoni i have multiple tags in my page without id please give me a regular expression so that i use the regular expression to retrive the value in my sites... Thank U

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900