Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Parsing an HTML document by using a recursive function

By , 19 Sep 2011
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 "" 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 = ""
Dim myHTML As String = webclient.DownloadString(url)
'Dim filePath As String = "C:\htmlsourcefile.txt"
'Dim myStreamReader = New System.IO.StreamReader(filePath)
'myHTML = myStreamReader.ReadToEnd


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

About the Author

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

Comments and Discussions

GeneralShouldn't this be a message, and not an alternate? PinsubeditorIndivara3-May-11 12:34 
GeneralRe: Agreed it should be ;P PinmemberEdMan1964-May-11 9:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web03 | 2.8.140415.2 | Last Updated 19 Sep 2011
Article Copyright 2011 by marc9889
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid