if (prettyPrint) { if (state == IN_TAG || state == IN_TEXT) indentTabs++; indent(); }
  public void addElement (String tag) {    if (state == DONE)      throw new IllegalStateException("end of document--can't add elements");    if (!validateName(tag))      throw new IllegalArgumentException("illegal tag name:  " + tag);    if (state == IN_TAG)      buf.append(">");    buf.append("<");    buf.append(tag);    pushName(tag);    state = IN_TAG;  }