Save to an XML File

I am using VBScript.  I need to make an HTTP call to an address and save it as an XML File.  I am pretty good with VB but I have never done this before, so if someone could nudge me in the right direction it would appreciated.

Thanks
LVL 3
99TimesAsked:
Who is Participating?
 
bruintjeCommented:
Hi 99Times,
----------

you could try something like

' declare objects
Dim xmlhttp, xmldoc
' create objects
Set xmlhttp = CreateObject("MSXML2.XMLHTTP")
Set xmldoc = CreateObject("MSXML2.DOMDocument")
' put url of xml here
xmlhttp.Open "GET", "http://www.w3schools.com/xml/note.xml", False
' send the order for this file out
xmlhttp.send
' put the return doc in the local xml document object
xmldoc.loadXML (xmlhttp.responseXML.XML)
' save to file
xmldoc.Save "c:\testmenow.xml"

----------
bruintje
share what you know, learn what you don't
0
 
99TimesAuthor Commented:
that worked great.  thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.