I know that I have childNodes in my XML

it has over 337 lines

But I still get a return of 0

My code

' Create new XML reader object
Dim xmlDoc
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
	' Load the specified XML file (returns XML output)
	xmlDoc.load("http://pathToXML")	
                         If (xmldoc.childNodes.length = 0) Then
			Response.Write("there are no childNodes") ' This reurns true	
		else
			Response.Write(xmldoc.childNodes.length)	 
		end if

Try this:
<script language="VBScript" runat=Server>
Dim xmlDOC
Dim bOK
Dim HTTP
Set HTTP = CreateObject("MSXML2.XMLHTTP")
Set xmlDOC =CreateObject("MSXML.DOMDocument")
xmlDOC.Async=False
HTTP.Open "GET","http://topics.cnn.com/topics/feeds/rss/technology", False
HTTP.Send()
bOK = xmlDOC.load(HTTP.responseXML)
if Not bOK then
Response.Write "Error loading XML from HTTP"
end if

Dim objNodeList
Set objNodeList=xmlDOC.documentElement.selectNodes("//rss/channel/item/title")
Response.Write "Total Items: "& objNodeList.Length

Dim I
For I = 0 to objNodeList.Length -1
Response.Write "<div>" & objNodeList(i).text & "</div>"
next
Response.Write "Status: " & HTTP.statusText
</script>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.