Package com.volantis.mcs.dom.output

Examples of com.volantis.mcs.dom.output.DocumentWriter


        Document document = domFactory.createDocument();
        protocol.writeProtocolString(document);

        StringWriter writer = new StringWriter();
        DocumentWriter documentWriter = new XMLDocumentWriter(writer);

        XMLDeclaration declaration = document.getDeclaration();
        if (declaration != null) {
            documentWriter.outputXMLDeclaration(declaration);
        }

        DocType docType = document.getDocType();
        if (docType != null) {
            documentWriter.outputDocType(docType);
        }

        assertEquals("Protocol string should match",
                expectedProtocolString,
                writer.getBuffer().toString());
View Full Code Here


     * @return The document outputter.
     */
    public DocumentOutputter createDocumentOutputter(Writer writer) {

        DTD dtd = protocolConfiguration.getDTD();
        DocumentWriter documentWriter = dtd.createDocumentWriter(writer);

        return new DOMDocumentOutputter(documentWriter, getCharacterEncoder());
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom.output.DocumentWriter

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.