how to insert in place of space in android

后端 未结 7 1010
死守一世寂寞
死守一世寂寞 2020-12-08 19:31

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         


        
7条回答
  •  执念已碎
    2020-12-08 20:06

    Try this:

    String temp = http://www.arteonline.mobi/iphone/output.php?gallery=MALBA%20-%20MUSEO%20DE%20ARTE%20LATINOAMERICANO%20DE%20BUENOS%20AIRES
    
    temp = temp.replaceAll(" ", "%20");
    URL sourceUrl = new URL(temp);
    

提交回复
热议问题