/** * Start document. * * @throws SAXException if processing the event failed */ public void writeStartDocument() throws SAXException { transformer.startDocument(); }
/** * @see org.xml.sax.ContentHandler#startDocument() */ public void startDocument() throws SAXException { // System.out.println("SaxDeserializer_impl::startDocument"); mTransformerHandler.startDocument(); }
public void startDocument() throws SAXException { handler.startDocument(); }
@Override public void startDocument() throws SAXException { this.handler.startDocument(); }
public void startDocument() throws SAXException { delegate.startDocument(); }
@Override public void startDocument() throws SAXException { this.traxHandler.startDocument(); }
/** {@inheritDoc} */ public void startDocument() throws SAXException { transformerHandler.startDocument(); }
public void startDocument() throws SAXException { handler.startDocument(); }
public void startDocument() throws SAXException { handler.startDocument(); }
/** * Receive notification of the beginning of a document. */ public void startDocument() throws SAXException { super.contentHandler.startDocument(); this.serializer.startDocument(); }
/** * initialize document writing */ private void startDocument() { AttributesImpl attrs = new AttributesImpl(); try { handler.startDocument(); handler.startElement("", TAG_PVLIST, TAG_PVLIST, attrs); documentStarted = true; } catch (Throwable e) { e.printStackTrace(); } }
private void startDocument() throws SAXException{ showState( "startDocument - TOP" ); //$NON-NLS-1$ if(isFormatted){ transformer.setOutputProperty(OutputKeys.INDENT, "yes");//$NON-NLS-1$ } handler.startDocument(); showState( "startDocument - BOT" ); //$NON-NLS-1$ }
public XMLOutput(OutputStream out) throws TransformerConfigurationException, SAXException { setNewLine("\n"); setIndentation(" "); SAXTransformerFactory factory = (SAXTransformerFactory)SAXTransformerFactory.newInstance(); xmlHandler = factory.newTransformerHandler(); Transformer transformer = xmlHandler.getTransformer(); transformer.setOutputProperty(OutputKeys.METHOD, "xml"); transformer.setOutputProperty(OutputKeys.VERSION, "1.0"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); xmlHandler.setResult(new StreamResult(out)); xmlHandler.startDocument(); }
@Override protected void _write(ICalendar ical) throws IOException { try { if (!started) { handler.startDocument(); if (!icalendarElementExists) { //don't output a <icalendar> element if the parent is a <icalendar> element start(ICALENDAR); } started = true; } write((ICalComponent) ical); } catch (SAXException e) { throw new IOException(e); } }
/** * Writes the root start tag to the result. * * @throws SAXException */ protected void writeStartDocument() { try { final AttributesImpl atts = new AttributesImpl(); handler.startDocument(); handler.startPrefixMapping(Constants.MARCXML_NS_PREFIX, Constants.MARCXML_NS_URI); handler.startElement(Constants.MARCXML_NS_URI, COLLECTION, Constants.MARCXML_NS_PREFIX + ":" + COLLECTION, atts); } catch (final SAXException details) { throw new MarcException("SAX error occured while writing start document", details); } }
private void attemptTransformation() throws SAXException { xmlOut.startDocument(); DbObjectXMLTransformer dboTransformer = new DbObjectXMLTransformer(xmlOut); dboTransformer.output(schema); xmlOut.endDocument(); }
private void attemptTransformation() throws SAXException { xmlOut.startDocument(); DbObjectXMLTransformer dboTransformer = new DbObjectXMLTransformer(xmlOut); dboTransformer.output(schema); xmlOut.endDocument(); }
public XMLDocument startDocument() throws SAXException{ nsSupport.reset(); attrs.clear(); elemStack.clear(); elem = null; depth = 0; nsSupport.pushContext(); xml.startDocument(); mark(); return this; }
public void parse(MergeTopicParser parser, String file) throws Exception { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setIgnoringComments(true); final DocumentBuilder builder = factory.newDocumentBuilder(); final Document output = builder.newDocument(); final TransformerHandler s = stf.newTransformerHandler(); s.getTransformer().setOutputProperty(OMIT_XML_DECLARATION , "yes"); s.setResult(new DOMResult(output)); parser.setContentHandler(s); parser.setLogger(new TestUtils.TestLogger()); parser.setOutput(new File(srcDir, file)); s.startDocument(); parser.parse(file, srcDir.getAbsoluteFile()); s.endDocument(); assertXMLEqual(builder.parse(new File(expDir, file)), output); }