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
When you build your URL you should use URLEncoder to encode the parameters.
StringBuilder query = new StringBuilder();
query.append("gallery=");
query.append(URLEncoder.encode(value, "UTF-8"));
If you already have the whole URL in a String or a java.net.URL, you could grab the query part and rebuild while URLEncoding each parameter value.