Refine search
protected XMLOutputFactory createOutputFactory() { return new WstxOutputFactory(); }
public XMLStreamWriter createXMLStreamWriter(OutputStream out) throws XMLStreamException { return createXMLStreamWriter(out, null); }
public XMLEventWriter createXMLEventWriter(Writer w, String enc) throws XMLStreamException { return new Stax2EventWriterImpl(createSW(null, w, enc, false)); }
public XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result) throws XMLStreamException { return createSW(result); }
WstxOutputFactory factory = new WstxOutputFactory(); factory.setProperty(WstxOutputFactory.P_AUTOMATIC_EMPTY_ELEMENTS, true);
public XMLEventWriter createXMLEventWriter(OutputStream out) throws XMLStreamException { return createXMLEventWriter(out, null); }
protected WstxOutputFactory getXMLFactory() { // initialize outputs System.setProperty("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); WstxOutputFactory xmlw = (WstxOutputFactory) WstxOutputFactory .newInstance(); xmlw.configureForRobustness(); xmlw.setProperty(XMLOutputFactory2.IS_REPAIRING_NAMESPACES, false); xmlw.setProperty(WstxOutputProperties.P_OUTPUT_FIX_CONTENT, true); xmlw.setProperty(WstxOutputProperties.P_OUTPUT_VALIDATE_CONTENT, true); return xmlw; }
public Export() { xmlf = (WstxOutputFactory) WstxOutputFactory.newInstance(); xmlf.configureForRobustness(); }
@Override public void writeToStream(Gexf gexf, Writer out, String encoding) throws IOException { try { XMLOutputFactory xmlOutputFactory = WstxOutputFactory.newInstance(); XMLStreamWriter streamWriter = xmlOutputFactory.createXMLStreamWriter(out); PrettyPrintHandler handler = new PrettyPrintHandler(streamWriter); streamWriter = (XMLStreamWriter) Proxy.newProxyInstance( XMLStreamWriter.class.getClassLoader(), new Class[]{XMLStreamWriter.class}, handler ); streamWriter.writeStartDocument(encoding, "1.0"); new GexfEntityWriter(streamWriter, gexf); streamWriter.writeEndDocument(); streamWriter.flush(); streamWriter.close(); } catch (XMLStreamException e) { throw new IOException("XML Exception: " + e.getMessage(), e); } }
public XMLStreamWriter2 createXMLStreamWriter(Writer w, String enc) throws XMLStreamException { return createSW(null, w, enc, false); }
WstxOutputFactory factory = new WstxOutputFactory(); factory.setProperty(WstxOutputFactory.P_AUTOMATIC_EMPTY_ELEMENTS, true); SMOutputFactory outf = new SMOutputFactory(factory); doc = outf.createOutputDocument(fout); doc.setIndentation("\n ", 1, 1);
@Override public XMLEventWriter createXMLEventWriter(OutputStream out) throws XMLStreamException { return createXMLEventWriter(out, null); }
/** * Configures XML Output Factory * * @return WstxOutputFactory */ protected WstxOutputFactory getXMLFactory() { // initialise outputs System.setProperty("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory"); WstxOutputFactory xmlw = (WstxOutputFactory) WstxOutputFactory .newInstance(); xmlw.configureForRobustness(); // configure factory xmlw.setProperty(XMLOutputFactory2.IS_REPAIRING_NAMESPACES, false); xmlw.setProperty(WstxOutputProperties.P_OUTPUT_FIX_CONTENT, true); xmlw.setProperty(WstxOutputProperties.P_OUTPUT_VALIDATE_CONTENT, true); return xmlw; }
public XMLEventWriter createXMLEventWriter(javax.xml.transform.Result result) throws XMLStreamException { return new Stax2EventWriterImpl(createSW(result)); }
public XMLOutputFactory2 createOutputFactory() { return new WstxOutputFactory(); }
public XMLStreamWriter createXMLStreamWriter(Writer w) throws XMLStreamException { if (w == null) { throw new IllegalArgumentException("Null Writer is not a valid argument"); } return createSW(null, w, null, false); }
public XMLStreamWriter createXMLStreamWriter(OutputStream out) throws XMLStreamException { return createXMLStreamWriter(out, null); }
public XMLEventWriter createXMLEventWriter(OutputStream out) throws XMLStreamException { return createXMLEventWriter(out, null); }
public XMLEventWriter createXMLEventWriter(OutputStream out, String enc) throws XMLStreamException { if (out == null) { throw new IllegalArgumentException("Null OutputStream is not a valid argument"); } return new Stax2EventWriterImpl(createSW(out, null, enc, false)); }
@Override public XMLOutputFactory2 createOutputFactory() { return new WstxOutputFactory(); }