public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
public ToXmlGenerator(IOContext ctxt, int genericGeneratorFeatures, int xmlFeatures, ObjectCodec codec, XMLStreamWriter sw) { super(genericGeneratorFeatures, codec); _xmlFeatures = xmlFeatures; _ioContext = ctxt; _xmlWriter = Stax2WriterAdapter.wrapIfNecessary(sw); }
public ToXmlGenerator(ObjectWriteContext writeCtxt, IOContext ioCtxt, int stdFeatures, int xmlFeatures, XMLStreamWriter sw, XmlPrettyPrinter pp) { super(writeCtxt, stdFeatures); _formatFeatures = xmlFeatures; _ioContext = ioCtxt; _originalXmlWriter = sw; _xmlWriter = Stax2WriterAdapter.wrapIfNecessary(sw); _stax2Emulation = (_xmlWriter != sw); _xmlPrettyPrinter = pp; }
public ToXmlGenerator(IOContext ctxt, int stdFeatures, int xmlFeatures, ObjectCodec codec, XMLStreamWriter sw) { super(stdFeatures, codec); _formatFeatures = xmlFeatures; _ioContext = ctxt; _originalXmlWriter = sw; _xmlWriter = Stax2WriterAdapter.wrapIfNecessary(sw); _stax2Emulation = (_xmlWriter != sw); _xmlPrettyPrinter = (_cfgPrettyPrinter instanceof XmlPrettyPrinter) ? (XmlPrettyPrinter) _cfgPrettyPrinter : null; }
/** * Method for constructing Stax stream writer to write xml content * to specified output stream. * Underlying stream writer will be constructed using Stax factory * this StaxMate factory was constructed with. *<p> * Encoding used will be UTF-8. */ public XMLStreamWriter2 createStax2Writer(OutputStream out) throws XMLStreamException { return Stax2WriterAdapter.wrapIfNecessary(_staxFactory.createXMLStreamWriter(out)); }
/** * Method for constructing Stax stream writer to write xml content * to specified output stream. * Underlying stream writer will be constructed using Stax factory * this StaxMate factory was constructed with. *<p> * Encoding used will be UTF-8. */ public XMLStreamWriter2 createStax2Writer(OutputStream out) throws XMLStreamException { return Stax2WriterAdapter.wrapIfNecessary(_staxFactory.createXMLStreamWriter(out)); }
/** * Method for constructing Stax stream writer to write xml content * using specified Writer. * Underlying stream writer will be constructed using Stax factory * this StaxMate factory was constructed with. *<p> * Encoding used will be UTF-8. */ public XMLStreamWriter2 createStax2Writer(Writer w) throws XMLStreamException { return Stax2WriterAdapter.wrapIfNecessary(_staxFactory.createXMLStreamWriter(w)); }
/** * Method for constructing Stax stream writer to write xml content * using specified Writer. * Underlying stream writer will be constructed using Stax factory * this StaxMate factory was constructed with. *<p> * Encoding used will be UTF-8. */ public XMLStreamWriter2 createStax2Writer(Writer w) throws XMLStreamException { return Stax2WriterAdapter.wrapIfNecessary(_staxFactory.createXMLStreamWriter(w)); }
public void writeFragment(NodeList nodes, XMLStreamWriter sw0) throws XMLStreamException { XMLStreamWriter2 sw = Stax2WriterAdapter.wrapIfNecessary(sw0); for (int i = 0, len = nodes.getLength(); i < len; ++i) { _writeNode(sw, (Node) nodes.item(i)); } }
@Override public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
@Override public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
public void writeFragment(Node node, XMLStreamWriter sw0) throws XMLStreamException { XMLStreamWriter2 sw = Stax2WriterAdapter.wrapIfNecessary(sw0); _writeNode(sw, node); }
@Override public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
@Override public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
@Override public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException { XMLStreamWriter2 sw2 = Stax2WriterAdapter.wrapIfNecessary(sw); return new Stax2EventWriterImpl(sw2); }
public void writeFragment(Node node, XMLStreamWriter sw0) throws XMLStreamException { XMLStreamWriter2 sw = Stax2WriterAdapter.wrapIfNecessary(sw0); _writeNode(sw, node); }
public void writeFragment(NodeList nodes, XMLStreamWriter sw0) throws XMLStreamException { XMLStreamWriter2 sw = Stax2WriterAdapter.wrapIfNecessary(sw0); for (int i = 0, len = nodes.getLength(); i < len; ++i) { _writeNode(sw, (Node) nodes.item(i)); } }
/** * Factory method for constructing output object that represents * a complete xml document including xml declaration and will * contain root element plus other optional elements (doctype * declaration, comment(s), PI(s)). *<p> * Note: you can not use this method to construct fragments, * for this purpose check out {@link #createOutputFragment}. */ public static SMOutputDocument createOutputDocument(XMLStreamWriter sw, String version, String encoding, boolean standAlone) throws XMLStreamException { return SMOutputContext.createInstance(Stax2WriterAdapter.wrapIfNecessary(sw)).createDocument(version, encoding, standAlone); }
/** * Method for writing out given DOM document using specified * stream writer. *<p> * Note: only regular <code>XMLStreamWriter.close()</code> is * called on the stream writer. This usually means that the underlying * stream is not closed (as per Stax 1.0 specification). */ public void writeDocument(Document doc, XMLStreamWriter sw0) throws XMLStreamException { XMLStreamWriter2 sw = Stax2WriterAdapter.wrapIfNecessary(sw0); sw.writeStartDocument(); for (Node child = doc.getFirstChild(); child != null; child = child.getNextSibling()) { _writeNode(sw, child); } sw.writeEndDocument(); sw.close(); }