indentStr += "  "; dumpElement(stream, indentStr, this);
b.append(' '); b.append('<'); b.append(getName());  if (getAttributeCount() > 0) { b.append('\n'); Enumeration attNames = getAttributeNames(); while (attNames.hasMoreElements()) { for (int i = 0; i < indent + 2; ++i) b.append(' '); Object attName = attNames.nextElement(); b.append(attName); b.append('='); Object attribute = getAttribute(attName); b.append(attribute); b.append('\n'); } } b.append(">\n");   if (isLeaf()) { for (int i = 0; i < indent + 2; ++i) b.append(' '); int start = getStartOffset(); int end = getEndOffset(); b.append('['); b.append(start); b.append(','); b.append(end); b.append("]["); try { b.append(getDocument().getText(start, end - start)); } catch (BadLocationException ex) { AssertionError err = new AssertionError("BadLocationException " + "must not be thrown " + "here."); err.initCause(ex); } b.append("]\n"); } stream.print(b.toString());   int count = getElementCount(); for (int i = 0; i < count; ++i) { Element el = getElement(i); if (el instanceof AbstractElement) ((AbstractElement) el).dump(stream, indent + 2); }
    public void dump(PrintStream stream, int indent)    {      String indentStr = "";      for (int i = 0; i < indent; ++i)	indentStr += "  ";      dumpElement(stream, indentStr, this);    }