The SAX parser will invoke this method only once, before any other event callbacks (except for {@link #setDocumentLocator setDocumentLocator}).
557558559560561562563564565566567
* an OutputStream to which the XML string will be written */ public void toXML(OutputStream aOutputStream) throws SAXException, IOException { XMLSerializer sax2xml = new XMLSerializer(aOutputStream); ContentHandler contentHandler = sax2xml.getContentHandler(); contentHandler.startDocument(); toXML(sax2xml.getContentHandler(), true); contentHandler.endDocument(); } /**
192193194195196197198199200201202
outDocHandler)); } ContentHandlerFactory inDocHandlerFactory = new SubdocumentHandlerFactory(inDocHandler); if (inDocHandler != null && inRepresentation != SINGLE_XML) { inDocHandler.startDocument(); inDocHandler.startElement("", "classes", "classes", new AttributesImpl()); }
943944945946947948949950951952953
final ContentHandler handler = session.getImportContentHandler( parentPath, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING); // first define the current namespaces String[] prefixes = session.getNamespacePrefixes(); handler.startDocument(); for (String prefix: prefixes) { handler.startPrefixMapping(prefix, session.getNamespaceURI(prefix)); } AttributesImpl attrs = new AttributesImpl(); attrs.addAttribute(Name.NS_SV_URI, "name", "sv:name", "CDATA", ni.name);
183184185186187188189190191192193
new TransformerHandlerFactory( saxtf, templates, outDocHandler)); } ContentHandlerFactory inDocHandlerFactory = new SubdocumentHandlerFactory( inDocHandler); if( inDocHandler!=null && inRepresentation!=SINGLE_XML) { inDocHandler.startDocument(); inDocHandler.startElement( "", "classes", "classes", new AttributesImpl()); } int n = 0; ZipEntry ze = null;
253254255256257258259260261262263
handler.setDocumentLocator(locator); } public void startDocument() throws SAXException { handler.startDocument(); } public void endElement(String uri, String localName, String qName) throws SAXException { // track menu depth if (qName.equals("menu"))
401402403404405406407408409410411
{ ContentHandler flistener = transformer.createResultContentHandler(new StreamResult(ostream), format); try { flistener.startDocument(); } catch(org.xml.sax.SAXException se) { throw new TransformerException(se); }
6465666768697071727374
String svuri = Name.NS_SV_URI; String svprefix = Name.NS_SV_PREFIX + ":"; ContentHandler ch = superuser.getImportContentHandler(testRootNode.getPath(), ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW); ch.startDocument(); ch.startPrefixMapping(prefix, uri); String nN = "node"; AttributesImpl attrs = new AttributesImpl(); attrs.addAttribute(svuri, "name", svprefix + "name", "CDATA", nodeName1);
449450451452453454455456457458459
112113114115116117118119120121122
// now install the current output in the filter chain... // #### ContentHandler handler = filter.getContentHandler(); handler.startDocument(); invokeBody( new XMLOutput( handler ) ); handler.endDocument(); valid = filter.isValid(); } else {
136137138139140141142143144145146
} } ); VerifierHandler handler = verifier.getVerifierHandler(); handler.startDocument(); invokeBody( new XMLOutput( handler ) ); handler.endDocument(); valid = handler.isValid(); } handleValid(valid);