I am trying to figure out why I am able to pull XML from a web site using MSXMLHTTP but when I load the responseText into the DocumentDom it doesn't accept the data. The funny thing is, if I pull the info from a static XML file it parses the data fine. This ultimately won't work for me though, because the url that I pic up the XML data from queries a web service with parameters so that the result set is different based on someones search term. What is even more odd, is that when I do use the dynamic query in my code and also pass in that I want only 50 results, my code works fine.
Anybody have an thoughts on why that might be happening. Here is the code. I had to hide certain info in the url since it has password info, but this should help.
Dim webServiceUrl, httpReq, node, myXmlDoc
' the url to get the data. It however does not work since I took out the site and password info
Set httpReq = Server.CreateObject("MSXML
httpReq.Open "GET",thexmlquery, False
httpReq.SetRequestHeader "Content-type", "text/xml"
Set myXmlDoc =Server.CreateObject("MSXM
theinfo = httpReq.responseXML.xml
Set httpReq = Nothing
'Get the necessary nodes to run the calculations.
Set objNodeList = myXmlDoc.getElementsByTagN
'Cycle through nodes and do calculations.
QtyCount = 0
For i = 0 TO (objNodeList.length -1)
Set objNode = objNodeList.nextNode
Quantity = objNode.text