By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,190 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,190 IT Pros & Developers. It's quick & easy.

application to read website code

P: n/a
Hi,
I wanted to know if there is any example or library that I could look
at to help me write an application that could read the html code from a
website. We currently have a site that display data like
<div class="reportproduct">
<div class="timeofreport">11:25 AM</div>
<div class="information">
<b>Product ABC</b>PRoduct is colored yellow, priced at 10</div>
<div class="reportproduct">
<div class="timeofreport">11:25 AM</div>
<div class="information">
<b>Product EFY</b>PRoduct is colored red, priced at 20</div>

basically the items repeat like that through out the html source, is
there anyway for me to be able to read the source for the page and then
extract just those portions of the code out? Basically we want to
create a monitoring tool for our site and want to read the source and
make sure what we want to see is coming.

Thank you.

Apr 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
phil2phil,

You can use the HttpWebRequest class to create requests for the HTML
content on your site. Then, you can use regular expressions, or a HTML
parser (such as MSHTML, through COM interop) to parse the content and access
it through an object model.

However, I would recommend using a web service instead which will give
you the same information.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"phil2phil" <ph*********@yahoo.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi,
I wanted to know if there is any example or library that I could look
at to help me write an application that could read the html code from a
website. We currently have a site that display data like
<div class="reportproduct">
<div class="timeofreport">11:25 AM</div>
<div class="information">
<b>Product ABC</b>PRoduct is colored yellow, priced at 10</div>
<div class="reportproduct">
<div class="timeofreport">11:25 AM</div>
<div class="information">
<b>Product EFY</b>PRoduct is colored red, priced at 20</div>

basically the items repeat like that through out the html source, is
there anyway for me to be able to read the source for the page and then
extract just those portions of the code out? Basically we want to
create a monitoring tool for our site and want to read the source and
make sure what we want to see is coming.

Thank you.

Apr 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.