+ Reply to Thread
Results 1 to 3 of 3

How to read HTML

  1. #1
    pechoi@syr.edu
    Guest

    How to read HTML

    Hi all,
    My function looks like:
    Function getWebPage()
    Dim loInet As InternetExplorer
    Dim lsURL As String
    Dim loObject As Object


    Set loInet = New InternetExplorer
    loInet.Visible = True

    lsURL = "http://finance.yahoo.com/"

    loInet.Navigate lsURL

    End Function

    I don't know how to read the HTML site I just opened.

    THx


  2. #2
    Jake Marx
    Guest

    Re: How to read HTML

    Hi,

    You can use the XMLHTTP object to read the HTML:

    Public Function gsGetHTML(rsURL As String) As String
    Dim x As Object

    Set x = CreateObject("Microsoft.XMLHTTP")

    With x
    .Open "GET", rsURL
    .send
    Do Until .ReadyState = 4
    DoEvents
    Loop
    gsGetHTML = .ResponseText
    End With

    Set x = Nothing
    End Function

    --
    Regards,

    Jake Marx
    www.longhead.com


    [please keep replies in the newsgroup - email address unmonitored]


    pechoi@syr.edu wrote:
    > Hi all,
    > My function looks like:
    > Function getWebPage()
    > Dim loInet As InternetExplorer
    > Dim lsURL As String
    > Dim loObject As Object
    >
    >
    > Set loInet = New InternetExplorer
    > loInet.Visible = True
    >
    > lsURL = "http://finance.yahoo.com/"
    >
    > loInet.Navigate lsURL
    >
    > End Function
    >
    > I don't know how to read the HTML site I just opened.




  3. #3
    pechoi@syr.edu
    Guest

    Re: How to read HTML

    Thx a lot!
    However, your function only print out limit of string (I printed out
    ..ResponseText). So it only gets 256 chararacters (i am just guessing).
    Do you know other way to print out more?

    Thx


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1