code: public static String encodeXMLEntity(final String tagName) {
  		StringBuffer encoded = new StringBuffer(tagName);
  		//replaceAll(encoded,";","&semi;");
  		replaceAll(encoded,"&","&amp;");
  		replaceAll(encoded,"\"","&quot;");
  		replaceAll(encoded,"'","&apos;");
  		replaceAll(encoded,"<","&lt;");
  		replaceAll(encoded,">","&gt;");
  		return encoded.toString();
  	}
docs: return a string appropriate for inclusion as an XML tag
  @param tagName raw string to be encoded
  @return encoded tagName
  @deprecated use getFormatter().escapeHtml(String)