I'm trying to request and save in a DDBB the lat and lng from google maps xml,the code I'm using is the following :
url = "http://maps.googleapis.com/maps/api/geocode/xml?address="&sensor=false"
response.write "URL... : " & url &"</br>"
Set objXMLDoc = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
objXMLDoc.setTimeouts 30000, 30000, 30000, 30000
objXMLDoc.Open "GET", url, False
objXMLDoc.send()
Dim xmlLocation
For Each xmlLocation In objXMLDoc.documentElement.selectNodes("location")
lat = xmlLocation.selectSingleNode("lat").text
lng = xmlLocation.selectSingleNode("lng").text
Response.Write Server.HTMLEncode(lat) & " "
Response.Write Server.HTMLEncode(lng) & "<br>"
Next
I keep getting error on : For Each xmlLocation In objXMLDoc.documentElement.selectNodes("location") ,it says its not a method. Any insight? thanks in advanced.