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

Retrieving part of a web page

P: n/a
Hi all,

Can any one say how can you go about retrieveing part of a web page
programatically??

I would like to access a specific page on a site and oly grap certain
information, maybe that has a particular heading e.g. "Latest News"

Many Thanks
Michael
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You have to pull the page text as the only way to get access to a web page
is via a page request - you can't ask for a bit of a page request.

Once you have the page contents then you can parse out whatever you need.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Michael Persaud" <ji*********@hotmail.com> wrote in message
news:u6**************@TK2MSFTNGP14.phx.gbl...
Hi all,

Can any one say how can you go about retrieveing part of a web page
programatically??

I would like to access a specific page on a site and oly grap certain
information, maybe that has a particular heading e.g. "Latest News"

Many Thanks
Michael

Nov 21 '05 #2

P: n/a
"Michael Persaud" <ji*********@hotmail.com> schrieb:
Can any one say how can you go about retrieveing part of a web page
programatically??

I would like to access a specific page on a site and oly grap certain
information, maybe that has a particular heading e.g. "Latest News"


For parsing the HTML file:

MSHTML Reference
<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/reference.asp>

- or -

..NET Html Agility Pack: How to use malformed HTML just like it was
well-formed XML...
<URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>

Download:

<URL:http://www.codefluent.com/smourier/download/htmlagilitypack.zip>

- or -

SgmlReader 1.4
<URL:http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B90FDDCE-E60D-43F8-A5C4-C3BD760564BC>

If the file read is in XHTML format, you can use the classes contained in
the 'System.Xml' namespace for reading information from the file.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.