Code example for ContentHandler

Methods: endPrefixMapping, startDocument

0
        catch(TransformerException te)
        { 
            throw new SAXException(te);
        } 
      } 
      m_resultContentHandler.startDocument();
      m_flushedStartDoc = true;
    } 
  } 
 
  /** 
   * Receive notification of the end of the document. 
   * 
   * <p>By default, do nothing.  Application writers may override this 
   * method in a subclass to take specific actions at the end 
   * of a document (such as finalising a tree or closing an output 
   * file).</p> 
   * 
   * @throws org.xml.sax.SAXException Any SAX exception, possibly 
   *            wrapping another exception. 
   * @see org.xml.sax.ContentHandler#endDocument 
   * 
   * @throws SAXException 
   */ 
  public void endDocument() throws SAXException 
  { 
    flushStartDoc(); 
    m_resultContentHandler.endDocument();
  } 
 
  /** 
   * Receive notification of the start of a Namespace mapping. 
   * 
   * <p>By default, do nothing.  Application writers may override this 
   * method in a subclass to take specific actions at the start of 
   * each Namespace prefix scope (such as storing the prefix mapping).</p> 
   * 
   * @param prefix The Namespace prefix being declared. 
   * @param uri The Namespace URI mapped to the prefix. 
   * @throws org.xml.sax.SAXException Any SAX exception, possibly 
   *            wrapping another exception. 
   * @see org.xml.sax.ContentHandler#startPrefixMapping 
   * 
   * @throws SAXException 
   */ 
  public void startPrefixMapping(String prefix, String uri)
          throws SAXException 
  { 
    flushStartDoc(); 
    m_resultContentHandler.startPrefixMapping(prefix, uri);
  } 
 
  /** 
   * Receive notification of the end of a Namespace mapping. 
   * 
   * <p>By default, do nothing.  Application writers may override this 
   * method in a subclass to take specific actions at the end of 
   * each prefix mapping.</p> 
   * 
   * @param prefix The Namespace prefix being declared. 
   * @throws org.xml.sax.SAXException Any SAX exception, possibly 
   *            wrapping another exception. 
   * @see org.xml.sax.ContentHandler#endPrefixMapping 
   * 
   * @throws SAXException 
   */ 
  public void endPrefixMapping(String prefix) throws SAXException
  { 
    flushStartDoc(); 
    m_resultContentHandler.endPrefixMapping(prefix);
  } 
 
  /** 
   * Receive notification of the start of an element. 
   *