You can parse it by Json.
if you see your url contains xml
here . This will give response in xml.
output with xml:
<PlaceSearchResponse>
<status>REQUEST_DENIED</status>
</PlaceSearchResponse>
Just replace it with json
like this . This will give response in Json.
output with Json:
{
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}
see this-blog for further help
For parsing
try
{
HttpPost httppost = new HttpPost("https://maps.googleapis.com/maps/api/place/search/json?&location=17.739290150000002,83.3071201&radius=6000&names=hospital&sensor=true&key=yourkeyhere");
HttpClient httpclient = new DefaultHttpClient();
response = httpclient.execute(httppost);
String data = EntityUtils.toString(response.getEntity());
System.out.println(data);
//parse with Json, Gson, Jackson
} catch (Exception e) {
e.printStackTrace();
}