The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).
275276277278279280281282283284285
// generates SAX events try { final DocumentHandler handler = writer.getDocumentHandler(); handler.setDocumentLocator( new LocatorImpl() ); handler.startDocument(); // to work around the bug of current serializer, // report xmlns declarations as attributes. if( defaultNs!=null )
242243244245246247248249250251252
handler.setDocumentLocator(locator); } public void startDocument() throws SAXException { handler.startDocument(); } public void startElement(String name, AttributeList atts) throws SAXException { // filter menu-element noded within menu definition
311312313314315316317318319320321
FileOutputStream ostream = new FileOutputStream(file); DocumentHandler flistener = sr.makeSAXSerializer(ostream, formatter); flistener.startDocument(); if(shouldPutInTable) { m_outputStreams.put(fileName, ostream); m_formatterListeners.put(fileName, flistener); }
243244245246247248249250251252253
6364656667686970717273
controller.getOutput(type), new OutputFormat("xml",null,true) ); XMLWriter out = new XMLWriter(outHandler); outHandler.setDocumentLocator( new LocatorImpl() ); outHandler.startDocument(); outHandler.processingInstruction("xml-stylesheet", "type='text/xsl' href='classFileDebug.xsl'"); writeClass( type, out ); outHandler.endDocument(); }
297298299300301302303304305306307