Thanks very much for your response.
The error is;
Invalid character in the given encoding. Line 1, position 126.
Below is what is sent;
URL = "http://maps.google.com/maps/geo?q=Hartmannstr+30,Weil+im+Schönbuch,,DE&output=xml&key=" + _
"ABQIAAAAR4h9tcbJyNCgHr0RBAyqDBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSLYTrTqnjv8HjmG0WWkFrM9nBdOw"
This is the offending code;
The error occurs when strTmp = XmlRdr.ReadString
XmlRdr = New XmlTextReader(URL)
XmlRdr.WhitespaceHandling = WhitespaceHandling.None
XmlRdr.MoveToContent()
Do While Not XmlRdr.EOF
If XmlRdr.Name = "name" Then
strTmp = XmlRdr.ReadString
End If
If XmlRdr.Name = "code" Then
If Not XmlRdr.ReadString = "200" Then
errFlg = True
strTmp = String.Concat(strTmp, vbCrLf, vbCrLf, "Address not found!")
MsgBox(strTmp, MsgBoxStyle.Exclamation)
End If
Exit Do
End If
XmlRdr.Read()
Loop
However, if the below url is sent then it works just fine!
URL = "http://maps.google.com/maps/geo?q=7310+Corsicana,Houston,,US&output=xml&key=" + _
"ABQIAAAAR4h9tcbJyNCgHr0RBAyqDBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSLYTrTqnjv8HjmG0WWkFrM9nBdOw"
When I use IExplorer and just paste the offending url in it, this is what is returned.
<?xml version="1.0" encoding="UTF-8" ?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Response>
<name>Hartmannstr 30,Weil im Schönbuch,,DE</name>
<Status>
<code>200</code>
<request>geocode</request>
</Status>
<Placemark id="p1">
<address>Hartmannstraße 30, 71093 Weil im Schönbuch, Bundesrepublik Deutschland</address>
<AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
<Country>
<CountryNameCode>DE</CountryNameCode>
<AdministrativeArea>
<AdministrativeAreaName>Baden-Württemberg</AdministrativeAreaName>
<SubAdministrativeArea>
<SubAdministrativeAreaName>Böblingen</SubAdministrativeAreaName>
<Locality>
<LocalityName>Weil im Schönbuch</LocalityName>
<Thoroughfare>
<ThoroughfareName>Hartmannstraße 30</ThoroughfareName>
</Thoroughfare>
<PostalCode>
<PostalCodeNumber>71093</PostalCodeNumber>
</PostalCode>
</Locality>
</SubAdministrativeArea>
</AdministrativeArea>
</Country>
</AddressDetails>
<Point>
<coordinates>9.056498,48.624399,0</coordinates>
</Point>
</Placemark>
</Response>
</kml>
I am at a loss to explain this. I would greatly appreciate any help.