|
-
December 25th, 2008, 05:38 PM
#1
How to obtain HtmlDocument from a string of a webpage?
Hi,
In my windows forms application I used to visit webpage using the WebBrowser and obtain an HtmlDocument by using the Document property of WebBrowser which works fine in win form application.
I'm wanting to use a Console Application and use the WebClient or WebRequest class (because it seems faster to visit pages than WebBrowser) and I want to obtain a HtmlDocument. Seems there are lots of ways to obtain a string representation of a webpage using these classes.
Is there a way to obtain an HtmlDocument object by somehow parsing the string to rebuild a possible HtmlDocument? This would be very handy in my situation whereby I'll then be able to use the DOM instead of trying to build complexe Regular Expressions to match patterns in the html.
Any ideas, much appreciated
please and thanks,
Ricky,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|