Package nl.flotsam.pecia.builder.xml

Examples of nl.flotsam.pecia.builder.xml.StreamingXmlWriter


            if (out == null) {
                return new NullXmlWriter();
            } else {
                XMLStreamWriter writer =
                        XMLOutputFactory.newInstance().createXMLStreamWriter(outputStreamFactory.create(), "UTF-8");
                return new StreamingXmlWriter(writer);
            }
        } catch (XMLStreamException e) {
            return new NullXmlWriter();
        } catch (IOException e) {
            return new NullXmlWriter();
View Full Code Here


    public static <T> void document(Codec<T> codec, DocumentType type,
                                    OutputStream out) {
        WstxOutputFactory documentFactory = new WstxOutputFactory();
        XmlWriter writer;
        try {
            writer = new StreamingXmlWriter(documentFactory
                    .createXMLStreamWriter(out));
            DefaultDocumentBuilder builder = type.createDocumentBuilder(writer);
            ArticleDocument document = new DefaultArticleDocument(builder,
                    codec.getCodecDescriptor().getTitle());
            document(codec, document);
View Full Code Here

TOP

Related Classes of nl.flotsam.pecia.builder.xml.StreamingXmlWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.