We're having the same problem here. If it's of any use, we've worked
out a (pretty dreadful but effective) workaround for 99.9% of lookup:
If Not Response.Contains("</Locality>") Then
If Response.Contains("<AdministrativeArea>")
Then
Response = Response.Replace("</
PostalCode>", "</PostalCode></Locality></AdministrativeArea></
Country></AddressDetails>")
Else
Response = Response.Replace("</
PostalCode>", "</PostalCode></Locality></Country></AddressDetails>")
End If
ElseIf Not Response.Contains("</Country>") Then
If Response.Contains("<AdministrativeArea>")
Then
Response = Response.Replace("</Locality>",
"</Locality></AdministrativeArea></Country></AddressDetails>")
Else
Response = Response.Replace("</Locality>",
"</Locality></Country></AddressDetails>")
End If
End If
Still looking forward to a permanent fix, and checking json as a
redundancy measure.
-Brendan
On Jul 23, 11:41 am, Tom Cocca <[email protected]> wrote:
> When trying to use the web based xml geocoding, I am getting malformed
> XML.
>
> See the output here:
>
> http://maps.google.com/maps/geo?q=81+Wareham+Street+Boston+MA+02118&k...
>
> Is anyone else having issues with geocoding? Started about an hour
> ago.
>
> I am getting the following error:
>
> XML Parsing Error: mismatched tag. Expected: </Locality>.
> Location:http://maps.google.com/maps/geo?q=81+Wareham+Street+Boston+MA+02118&k...
> Line Number 15, Column 5: </Placemark>
> ----^
>
> when viewing the source I get the following:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <kml xmlns="http://earth.google.com/kml/2.0"><Response>
> <name>81 Wareham Street Boston MA 02118</name>
> <Status>
> <code>200</code>
> <request>geocode</request>
> </Status>
> <Placemark id="p1">
>
> <address>81 Wareham St, Boston, MA 02118, USA</address>
> <AddressDetails Accuracy="8"
> xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:
> 2.0"><Country><CountryNameCode>US</CountryNameCode><CountryName>USA</
> CountryName><AdministrativeArea><AdministrativeAreaName>MA</
> AdministrativeAreaName><Locality><LocalityName>Boston</
> LocalityName><Thoroughfare><ThoroughfareName>81 Wareham St</
> ThoroughfareName></Thoroughfare><PostalCode><PostalCodeNumber>02118</
> PostalCodeNumber></PostalCode>
> <ExtendedData>
> <LatLonBox north="42.3418656" south="42.3355704"
> east="-71.0639344" west="-71.0702296" />
> </ExtendedData>
>
> <Point><coordinates>-71.0670820,42.3387180,0</coordinates></Point>
> </Placemark>
> </Response></kml>
>
> Any ideas?
>
> Thanks,
> ~ Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---