public void endElement(String uri,String localName,String qName) throws SAXException {
  try {
    if (qName.equals("overviews")) {
      if (packages.size() > 0) {
        writer.newLine();
        writer.write("<packages>");
        for (Iterator iterator=packages.iterator(); iterator.hasNext(); ) {
          PackageInfo info=(PackageInfo)iterator.next();
          writer.newLine();
          writer.write("<package name=\"" + info.name + "\">");
          writer.newLine();
          writer.write("<shortDescription>" + info.description + "</shortDescription>");
          writer.write("<longDescription>" + info.description + "</longDescription>");
          writer.newLine();
          writer.write("</package>");
        }
        writer.newLine();
        writer.write("</packages>");
      }
    }
    writer.write("</" + qName + ">");
  }
 catch (  IOException ioe) {
    throw new SAXException(ioe);
  }
}

public void endElement ( String uri , String localName , String qName ) throws SAXException { try { if ( qName . equals ( "overviews" ) ) { if ( packages . size ( ) > 0 ) { writer . newLine ( ) ; writer . write ( "<packages>" ) ; for ( Iterator iterator = packages . iterator ( ) ; iterator . hasNext ( ) ; ) { PackageInfo info = ( PackageInfo ) iterator . next ( ) ; writer . newLine ( ) ; writer . write ( "<package name=\"" + info . name + "\">" ) ; writer . newLine ( ) ; writer . write ( "<shortDescription>" + info . description + "</shortDescription>" ) ; writer . write ( "<longDescription>" + info . description + "</longDescription>" ) ; writer . newLine ( ) ; writer . write ( "</package>" ) ; } writer . newLine ( ) ; writer . write ( "</packages>" ) ; } } writer . write ( "</" + qName + ">" ) ; } catch ( IOException ioe ) { throw new SAXException ( ioe ) ; } }
implementation for default handler method
