application to read website code

  • Thread starter Thread starter phil2phil
  • Start date Start date
P

phil2phil

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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top