HTML parsing in Java
Basically if I have a string that looks like this:
%22Hello+World+%26+Hello+World%22
because I took it from HTML, how do I get Java to make this say Hello World & Hello World, aka replace the HTML pieces with text?
Thanks开发者_JAVA百科
URLDecoder:
java.net.URLDecoder.decode("%22Hello+World+%26+Hello+World%22", "UTF-8")
Update: Modified to pass in the encoding as the second parameter.
精彩评论