code: public static String convertCharsFromXml(String input) {
  		StringBuffer result = new StringBuffer();
  		for(int i=0; i<input.length();) {
  			if(input.charAt(i)=='&') {
  				if(input.substring(i, i+3).equals("&lt;")) {
  					result.append('<');
  					i += 4;
  				} else if(input.substring(i, i+3).equals("&gt;")) {
  					result.append('>');
  					i += 4;
  				} else if(input.substring(i, i+4).equals("&amp;")) {
  					result.append('&');
  					i += 5;
  				} else if(input.substring(i, i+5).equals("&quot;")) {
  					result.append('"');
  					i += 6;
  				} else if(input.substring(i, i+5).equals("&apos;")) {
  					result.append('\'');
  					i += 6;
  				} else {
  					result.append(input.charAt(i));
  					i++;
  				}
  			} else {
  				result.append(input.charAt(i));
  				i++;
  			}
  		}
  		return result.toString();
  	}
docs: Convenience method for backward conversion of XML encoded chars.
  
  @param input XML encoded string to be converted.
  @return Converted string.