I am reading a document which may contain XML entities like  
.
Since I need to export txt file, I manually have to convert the entities from XML to text.
As you can see below.
reader = new BufferedReader(new InputStreamReader(is, "utf-8"));
while ((s = reader.readLine()) != null) {
if (s.equals(" "))
s= " ";
}
Since there are many xml entities, and I want to convert them all to text like  
->space, and prefer to avoid if then, is there a generic way to do it?