IncaWarrior
12-01-2004, 09:01 PM
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async = False
xmlDoc.Load (server.mappath("counters.xml"))
URI = Request.ServerVariables("URL").Substring(10)
Set cnode= xmlDoc.documentElement.SelectSingleNode("page[URI = " & URI & "]").childNodes(1).text
cnode.childNodes(1).text = Int32.Parse(cnode.childNodes(1).text)+1
set objXMLDoc = nothing
%>
The idea is that this code takes the header info and increments a value in an xml database that represents the hits for a page. Unfortunately I can't get it to work at all :(. The Substring(10) makes it say "Object required: '..pageurl..'", and it wants more when I tell it to select a node.
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async = False
xmlDoc.Load (server.mappath("counters.xml"))
URI = Request.ServerVariables("URL").Substring(10)
Set cnode= xmlDoc.documentElement.SelectSingleNode("page[URI = " & URI & "]").childNodes(1).text
cnode.childNodes(1).text = Int32.Parse(cnode.childNodes(1).text)+1
set objXMLDoc = nothing
%>
The idea is that this code takes the header info and increments a value in an xml database that represents the hits for a page. Unfortunately I can't get it to work at all :(. The Substring(10) makes it say "Object required: '..pageurl..'", and it wants more when I tell it to select a node.