troubleshooting Question

Read XML from Webpage

Avatar of Overthere
Overthere asked on
Visual Basic Classic
12 Comments2 Solutions415 ViewsLast Modified:
I want to read XML from a webpage and write it to a file.  Here's what I have and all I get in the output file is [OBJECT]:

It doesn't save the contents of the page..
what am I doing wrong?? I want to save the contents of the page as a file...
Private Function Chkit()
Dim shWin As New ShellWindows
Dim ie As InternetExplorer

For Each ie In shWin
 If ie.LocationURL = "" Then
    MsgBox ("Found it")
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile("c:\testfile.txt", True)
    a.writeline (ie.Document)
    vswi = 1
    Exit For
    MsgBox ("Not found yet")
    vswi = 0
 End If

 If vswi = 1 Then
    Chkit = 1
    Chkit = 0
 End If
End Function
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros