Mike Caldwell
asked on
How to capture XML returned from a cURL call with VBScript?
I have a VBS program that successfully runs a cURL script, which accesses my API. XML is returned to the screen fine. However I want to capture the return from within the VBS script. Here is what I have:
I swiped the Doc.LoadXML.responseText from another script that worked fine when a log in was not required. I just need to get the XML text into memory so I can pretty it up for display.
'* Run a Curl command line
Set objXMLDoc = CreateObject("Msxml2.DOMDocument")
Set WSHShell = CreateObject("WScript.Shell")
wSHShell.run("CMD.exe")
wscript.sleep 2000
wSHShell.run("CURL1.bat")
objXMLDoc.LoadXML .responseText
msgbox "Data returned is: " &objXMLDoc.SelectSingleNode("//recordID").text
I swiped the Doc.LoadXML.responseText from another script that worked fine when a log in was not required. I just need to get the XML text into memory so I can pretty it up for display.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know how to get it to do that.
ASKER
I've posted this about three different ways and nobody offers the solution I'm looking for. So I guess I'll go with the temp file. Thanks Dave.
You're welcome. I really don't the way you want exists.
ASKER