private boolean isXMLString(String string){
  return string.contains("</") || string.contains("/>");
}

private boolean isXMLString ( String string ) { return string . contains ( "</" ) || string . contains ( "/>" ) ; }
check whether a string containing at least one ' / ' or ' \ ' character is likely to be a fragment of xml .
