Note that there are some explanatory texts on larger screens.

plurals
  1. POParse Xml Data in StringBuilder
    primarykey
    data
    text
    <p>So iam using Reverse GeoCoding , everything work fine but i receive the response in the xml format packaged in StringBuilder</p> <p>i am looking to get just One line eg. : i want item1 in a String , how can achieve this ? </p> <p>Here is my code ;</p> <pre><code> public void getPlaces() { HttpURLConnection connection = null; URL serverAddress = null; Double latitude = 37.422006; Double longitude = -122.084095; try { // build the URL using the latitude &amp; longitude you want to lookup // NOTE: I chose XML return format here but you can choose something else serverAddress = new URL("http://maps.google.com/maps/geo?q=" + Double.toString(latitude) + "," + Double.toString(longitude) + "&amp;output=xml&amp;oe=utf8&amp;sensor=true"); //set up out communications stuff connection = null; //Set up the initial connection connection = (HttpURLConnection)serverAddress.openConnection(); connection.setRequestMethod("GET"); connection.setDoOutput(true); connection.setReadTimeout(10000); connection.connect(); BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); StringBuilder sb = new StringBuilder(); String line = null; while ((line = rd.readLine()) != null) { sb.append(line + '\n'); } // now the response is packaged in a string, // parse the XML or whatever you need String responseText = sb.toString(); Toast.makeText(this, responseText, Toast.LENGTH_LONG).show(); } catch (Exception ex) { ex.printStackTrace(); } } </code></pre> <p>Thanks .</p> <p>Edit : Solved Using this Link :</p> <p><a href="http://www.smnirven.com/blog/2009/10/09/reverse-geocode-lookup-using-google-maps-api-on-android-revisited/" rel="nofollow">http://www.smnirven.com/blog/2009/10/09/reverse-geocode-lookup-using-google-maps-api-on-android-revisited/</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload