fatboyjim77
Programmer
Hi, I've been going over this for 4 hours now so really need a pointer from someone smarter please.
Loading xml file into ASP and cant get it to recognise any root or childnodes. The document is retrieved, and I can print it out, but it doesnt think there a root
URL i'm picking up is:
Code I'm using is:
-------------------------------------
URLToRSS="
Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", URLToRSS, false
xmlHttp.Send()
RSSXML = xmlHttp.ResponseText
Set xmlDoc = Server.CreateObject("MSXML2.DomDocument.3.0")
xmlDoc.async = false
xmlDoc.LoadXml(RSSXML)
Set xmlRoot = xmlDoc.documentElement
If isnull(xmlRoot.hasChildNodes()) Then
Response.Write("nothing found")
End If
IF xmlRoot.hasChildNodes() THEN
FOR EACH top IN xmlRoot.childNodes
IF top.NodeName = "event" THEN
etc......
-------------------------------------
This code works happily for other feeds in exactly the same format but not this.. I put the isnull check code in to show it really isnt finding anything.
Pointers appreciated
Thanks
Loading xml file into ASP and cant get it to recognise any root or childnodes. The document is retrieved, and I can print it out, but it doesnt think there a root
URL i'm picking up is:
Code I'm using is:
-------------------------------------
URLToRSS="
Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", URLToRSS, false
xmlHttp.Send()
RSSXML = xmlHttp.ResponseText
Set xmlDoc = Server.CreateObject("MSXML2.DomDocument.3.0")
xmlDoc.async = false
xmlDoc.LoadXml(RSSXML)
Set xmlRoot = xmlDoc.documentElement
If isnull(xmlRoot.hasChildNodes()) Then
Response.Write("nothing found")
End If
IF xmlRoot.hasChildNodes() THEN
FOR EACH top IN xmlRoot.childNodes
IF top.NodeName = "event" THEN
etc......
-------------------------------------
This code works happily for other feeds in exactly the same format but not this.. I put the isnull check code in to show it really isnt finding anything.
Pointers appreciated
Thanks