Hi all,
I am having an issue with being able to work with an .xml across the network (will be a web service).
I have a function that takes in a object that has a url in it. I do not have any issues getting to the web addresses and I know this because if I use wscript.echo http.responsetext it will show all of the xml file on the screen.
However when I try to use set xmlData = http.responsexml so that I can start parsing the file, I keep getting object required errors.
for testing I did try doing a wscript.echo xmlData.xml and this actually displayed xml for only 1 of the 4 addresses I passed to it.
I also tried using the other option of microsoft.xmlhttp MSXML2.XMLHTTP and still same errors.
Public Function isUpdated(update)
Dim HTTP, xmlData
Set HTTP = CreateObject("Microsoft.xmlhttp")
http.open "GET", update.uri, FALSE
http.setRequestHeader "Content-Type", "text/xml"
http.send
set xmlData = http.responsexml
set childnodes = xmldata.documentelement.childnodes ' THIS IS WHERE I GET OBJECT ERRORS ON DOCUMENTELEMENT
for each node in childnodes
wscript.echo node.nodename
next
set http = nothing
end Function
part of one of the xml files I am trying to parse is (I can't show all of the files as this is work related):
<?xml version="1.0" encoding="utf-8" ?>
- <manifest xmlns:xsi=" xmlns:xsd=" manifestId="22739229-7e40-4e93-936f-6a35523b59fb" mandatory="No" xmlns="urn:schemas-microsoft-com
AG:updater-application-block:v2:manifest">
</manifest>
I am only trying to grab the manifestId out of the files.... Any ideas?
Thanks!
I am having an issue with being able to work with an .xml across the network (will be a web service).
I have a function that takes in a object that has a url in it. I do not have any issues getting to the web addresses and I know this because if I use wscript.echo http.responsetext it will show all of the xml file on the screen.
However when I try to use set xmlData = http.responsexml so that I can start parsing the file, I keep getting object required errors.
for testing I did try doing a wscript.echo xmlData.xml and this actually displayed xml for only 1 of the 4 addresses I passed to it.
I also tried using the other option of microsoft.xmlhttp MSXML2.XMLHTTP and still same errors.
Public Function isUpdated(update)
Dim HTTP, xmlData
Set HTTP = CreateObject("Microsoft.xmlhttp")
http.open "GET", update.uri, FALSE
http.setRequestHeader "Content-Type", "text/xml"
http.send
set xmlData = http.responsexml
set childnodes = xmldata.documentelement.childnodes ' THIS IS WHERE I GET OBJECT ERRORS ON DOCUMENTELEMENT
for each node in childnodes
wscript.echo node.nodename
next
set http = nothing
end Function
part of one of the xml files I am trying to parse is (I can't show all of the files as this is work related):
<?xml version="1.0" encoding="utf-8" ?>
- <manifest xmlns:xsi=" xmlns:xsd=" manifestId="22739229-7e40-4e93-936f-6a35523b59fb" mandatory="No" xmlns="urn:schemas-microsoft-com
</manifest>
I am only trying to grab the manifestId out of the files.... Any ideas?
Thanks!