private bool IsAttrChar(int ch) { switch (ch) { case '&': case '\r': case '\t': case '\n': return false; default: return true; } }