473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Using MSXML2 to read a table from a webpage

I have tried to use a webbrowser in my VB program to load a web page and the table on the web page. It works but VERY slowly and a lot of the time it freezes.
I found some sample code that reads the web page without a web browser. It reads the text on the web page and puts it into a Rich Text Box called WebText.
This code works really quick and never locks up but it does not read the text that is in the table on the webpage.

The code I am using calls the function below:

Expand|Select|Wrap|Line Numbers
  1.     WebText.Text = GetHTMLCode("http://xfinitytv.comcast.net/tv-listings")
  2.  
  3.  
  4.     Function GetHTMLCode(ByVal strURL) As String
  5.         Dim strReturn       ' As String
  6.         Dim objHTTP         ' As MSXML.XMLHTTPRequest
  7.         If Len(strURL) = 0 Then Exit Function
  8.         objHTTP = CreateObject("MSXML2.XMLHTTP")
  9.         objHTTP.open("GET", strURL, False)
  10.         objHTTP.send()                    'Get it.
  11.         strReturn = objHTTP.responseText
  12.         objHTTP = Nothing
  13.         GetHTMLCode = strReturn
  14.     End Function
I am new to programming (hoping to get better with time). If I write something that sounds like I do not know what I am talking about it is probably because I don't. Any help would be appreciate. Also, I am using VB2010.

Thanks,
Chris
Apr 8 '13 #1
0 855

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ahmed A. | last post by:
This will be very helpfull for many! Using RichTextBox Read/Write Unicode File http://www.microsoft.com/indonesia/msdn/wnf_RichTextBox.as p Private Function ReadFile(ByVal myfile As String)...
2
by: Loane Sharp | last post by:
Hi there I'm downloading data from a remote server to my local disk using Stream.Read() and Stream.Write() (as previously suggested by Ken Tucker in this group). By and large the download and...
1
by: Juergen Wohnich | last post by:
I want to read a webpage in chart buffer and than i want to parse it. If have found out that "CInternetSession.OpenURL" is the way to do this, but now i seraching for a complete sample. Maybe a...
5
by: sck10 | last post by:
Hello, I need to create a Business Rules table that can be pulled into the web page and use it as criteria for who should receive the approval email. For example, I have created a travel...
1
by: sowmyavenkat | last post by:
hi all, Iam working on a Maintainance and enhancement project. It was developed by somebody. Now there is a bug which is to be solved. Can any body help me to find out which stored procedure is...
1
by: pds79 | last post by:
Hi everyone, I'm a newbie to the forum. I have an issue and was hoping to get some assistance/ideas: Im trying to read a XML file into two record sets. I can acheive looping through the...
16
by: BlackEye | last post by:
Hi all! i want to validate the user name and password using an sql table i created. i have tried the following code: SqlConnection myConnection = new SqlConnection("data...
3
by: dfordinal | last post by:
I am calling a remote web server and awaiting data that is being passed back to my process in a form variable. postData = "fname=John" Set xmlHttp =...
0
by: Quickzilverfox | last post by:
I am attempting to send a purchase request string to a webservice on a remote site I am able to successfully send the quoterequest using Msxml2.ServerXMLHTTP on one page and parse the response. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.