Hello all,
I am trying to fetch XML data from a web site. I manage to access the data as text, and I wrote a function to parse it (very lengthy).
I found that you can getElementsByTagName but this is not working for me. Here is my code:
Req.responseText has content, but Resp has ZERO childNodes. I would like to get the elements by Tag Name... but since Resp has no content, I cannot do anything.
Thanks,
hilss
I am trying to fetch XML data from a web site. I manage to access the data as text, and I wrote a function to parse it (very lengthy).
I found that you can getElementsByTagName but this is not working for me. Here is my code:
Rich (BB code):
Private Sub GetPredictItData()
Dim Req As New XMLHTTP60
Dim myurl As String
Dim myUrlId As String
myUrlId = 3633
myurl = "https://www.predictit.org/api/marketdata/markets/" & myUrlId
Req.Open "GET", myurl, False
Req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
Req.send
Dim Resp As New MSXML2.DOMDocument60
Resp.LoadXML Req.responseText ' this is the part that is not working as expected
End Sub
Req.responseText has content, but Resp has ZERO childNodes. I would like to get the elements by Tag Name... but since Resp has no content, I cannot do anything.
Thanks,
hilss