But of course, the response is in XML, so you're also wondering how to parse this XML response for something meaningful? The answer is the
DOMParser and namespaces. There is a really nice function,
getElementsByTagNameNS that allows you to parse out elements given a namespace. I kept trying
getElementsByTagNameNS("gml","name"), which didn't work. The answer seems to be that you need to include a valid uri for the namespace.
var dom = new DOMParser ( ) .parseFromString ( responseText,
"application/xml" ) ;
var location = dom.getElementsByTagNameNS (
"http://www.opengis.net/gml", "name" ) .firstChild.data
if location == " ( Unknown city ) "