Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 737723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:45:15+00:00 2026-05-14T07:45:15+00:00

how would i put the contents of a webpage into a string? it would

  • 0

how would i put the contents of a webpage into a string?

it would be the same thing as hitting ctrl+A and copying and pasting it.

is there a way to do this programmatically without ‘sendkeys’ ?

i do not want to look at the html source at all, i just want to copy the text on the site

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:45:16+00:00Added an answer on May 14, 2026 at 7:45 am

    I’ve done a fair bit of screen scraping for applications and have found this to be invaluable:
    https://github.com/MindTouch/SGMLReader

    There is a bit of sample code on that page but I’ve added a bit extra here that will return exactly what you want

    Imports System.Xml
    Imports System.IO
    Imports System.Net
    Imports System.Text
    
    Function FromHtml(ByVal reader As TextReader) As XmlDocument
        '' setup SgmlReader   
        Dim sgmlReader As Sgml.SgmlReader = New Sgml.SgmlReader()
        sgmlReader.DocType = "HTML"
        sgmlReader.WhitespaceHandling = WhitespaceHandling.None
        sgmlReader.CaseFolding = Sgml.CaseFolding.ToLower
        sgmlReader.InputStream = reader
        '' create document 
        Dim doc As XmlDocument = New XmlDocument()
        doc.PreserveWhitespace = True
        doc.XmlResolver = Nothing
        doc.Load(sgmlReader)
        Return doc
    End Function
    
    Function LoadWebText(ByVal URL As String) As String
        Dim objWebClient As New WebClient()
        Dim objUTF8 As New UTF8Encoding()
    
        Dim xml As New XmlDocument
        xml = FromHtml(New StringReader(objUTF8.GetString(objWebClient.DownloadData(URL))))
    
        Return xml.InnerText()
    
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This below goes through files in a directory, reads them and saves them in
I have this Zebra ZM400 Printer connected to the network ( 192.168.1.50 ). And
I need to push some JSON data to my website which I would like
I'm predominately a Java guy, which is why I need some assistance on what
I am building a console application that gathers some data and then sends it
For the app I'm currently working on, one of my main ViewControllers contains two
I work at a small computer shop, and we have to analyze windows minidumps
I am relatively new to C++, coming from the happy-go-lucky world of Python. I
So as part of problem 17.6 in Think Like a Computer Scientist, I've written
I have an unlimited/unbound number of DIV tags that are floating to the left.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.