code: public void startElement (String uri, String localName,
                                String qName, Attributes atts)
      throws SAXException
      {
          if (!stateStack.empty()) {
              doNewline();
              doIndent();
          }
          stateStack.push(SEEN_ELEMENT);
          state = SEEN_NOTHING;
          super.startElement(uri, localName, qName, atts);
      }
docs: Add newline and indentation prior to start tag.
  
  <p>Each tag will begin on a new line, and will be
  indented by the current indent step times the number
  of ancestors that the element has.</p>
  
  <p>The newline and indentation will be passed on down
  the filter chain through regular characters events.</p>
  
  @param uri The element's Namespace URI.
  @param localName The element's local name.
  @param qName The element's qualified (prefixed) name.
  @param atts The element's attribute list.
  @exception org.xml.sax.SAXException If a filter
  further down the chain raises an exception.
  @see org.xml.sax.ContentHandler#startElement