Code: Select all
Dim APICall As String
Dim Query As String
Dim strKey As String
Dim T As Long
Dim myXML As New MSXML2.DOMDocument60
Dim nodes As IXMLDOMSelection
APICall = "http://dev.virtualearth.net/REST/V1/Routes/Driving"
Query = "?output=xml&maxSolns=1&wp.0=" & wp0 & " &wp.1=" & wp1 & "&routeAttributes=excludeItinerary,routePath&optimize=time"
strKey = "&key=" & APIKEY
'Debug.Print APICall & Query & strKey
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", APICall & Query & strKey, False
.send
Do While myXML.readyState <> READYSTATE_COMPLETE
Sleep (100)
Loop
now i need to loop all nodes and return, from it a value from:
<StartLocation>
<Name>46.9258, 11.978</Name>
<Point>
<Latitude>46.9258</Latitude>
<Longitude>11.978</Longitude>
</Point>
...
<EndLocation>
<Name>37.3107, 13.5766</Name>
<Point>
<Latitude>37.310699</Latitude>
<Longitude>13.576599999999999</Longitude>
</Point>
note:
Attached a txt file of xml...