private static final void appendTag(StringBuffer buf, int indent, String tag, String content)
private static void appendTag(StringBuffer buf, int indent, String tag, String content)
  private static final void appendTag(StringBuffer buf,				      int indent,				      String tag,				      String content)  {		int i;		if (content == null)			return;		for (i = 0; i < indent * 2; i++)			buf.append(' ');		buf.append("<");		buf.append(tag);		buf.append('>');		/* Append the content, but escape for XML by replacing		 * '&', '<', '>' and all non-ASCII characters with		 * appropriate escape sequences.		 * The Sun J2SE 1.4 reference implementation does not		 * escape non-ASCII characters. This is a bug in their		 * implementation which has been reported in the Java		 * bug parade as bug number (FIXME: Insert number here).		 */    for (i = 0; i < content.length(); i++)    {			char c = content.charAt(i);      switch (c)      {      case '&':					buf.append("&amp;");					break;      case '<':					buf.append("&lt;");					break;      case '>':					buf.append("&gt;");					break;      default:	if (((c >= 0x20) && (c <= 0x7e))	    || (c == /* line feed */ 10)	    || (c == /* carriage return */ 13))						buf.append(c);	else	{						buf.append("&#");						buf.append((int) c);						buf.append(';');					}					break;			} /* switch (c) */		} /* for i */		buf.append("</");		buf.append(tag);		buf.append(">");		buf.append(lineSep);	}