public static String escapeXML(String string){
  if (string == null) {
    return "null";
  }
  return StringEscapeUtils.escapeXml(string);
}

public static String escapeXML ( String string ) { if ( string == null ) { return "null" ; } return StringEscapeUtils . escapeXml ( string ) ; }
replaces angle brackets by html entities .
