I have a xml URL file in which there are white spaces i want to replace white spaces with %20.. how to do this????
SAXParserFactory spf = SAXParserFactory.ne
Just one addition to sudocode's response:
Use android.net.Uri.encode
instead of URLEncoder.encode
to avoid the "spaces getting converted into +" problem. Then you get rid of the String.replaceAll()
and it's more elegant :)
StringBuilder query = new StringBuilder();
query.append("gallery=");
query.append(android.net.Uri.encode(value));