Click here to Skip to main content
12,301,983 members (56,082 online)
Click here to Skip to main content
Add your own
alternative version

Stats

4.9K views
Posted

Parsing an HTML document by using a recursive function

, 19 Sep 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
In response to the request to use a website (instead of a file), the pertinent code is shown below. Note that you will need to replace "www.somewebsite.com" with the website page that you want to capture the source code (HTML, for example) from.Dim webclient As System.Net.WebClient = New...

In response to the request to use a website (instead of a file), the pertinent code is shown below. Note that you will need to replace "www.somewebsite.com" with the website page that you want to capture the source code (HTML, for example) from.

Dim webclient As System.Net.WebClient = New System.Net.WebClient
Dim url As String = "http://www.somewebsite.com"
Dim myHTML As String = webclient.DownloadString(url)
 
'Dim filePath As String = "C:\htmlsourcefile.txt"
'Dim myStreamReader = New System.IO.StreamReader(filePath)
'myHTML = myStreamReader.ReadToEnd

License

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

Share

About the Author

marc9889
Software Developer (Senior) Jacobs Technology
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralShouldn't this be a message, and not an alternate? Pin
Indivara3-May-11 12:34
subeditorIndivara3-May-11 12:34 
GeneralRe: Agreed it should be ;P Pin
EdMan1964-May-11 9:37
memberEdMan1964-May-11 9:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160530.1 | Last Updated 19 Sep 2011
Article Copyright 2011 by marc9889
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid