if (prettyPrint && state == IN_ELEMENT) { indentTabs--; indent(); }
  public void endElement () {    if (state == EMPTY || state == DONE)      throw new IllegalStateException("can't close element--none is current");    String tag = popName();    if (state == IN_TAG) {      buf.append("/>");    }    else {      buf.append("</");      buf.append(tag);      buf.append(">");    }    if (nameStackEmpty())      state = DONE;    else      state = IN_ELEMENT;  }