Package com.volantis.mcs.dom.output

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


        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


        Element top = buffer.getRoot();
        StringWriter writer = new StringWriter();


        DOMDocumentOutputter outputter = new DOMDocumentOutputter(
                                    new XMLDocumentWriter(writer),
                                    new DebugCharacterEncoder());
        try {
            outputter.output(top);
        } catch (IOException e){
            fail("Failed with "+e.toString());
View Full Code Here

        Element top = buffer.getRoot();
        StringWriter writer = new StringWriter();
   
       
        DOMDocumentOutputter outputter = new DOMDocumentOutputter(
                                    new XMLDocumentWriter(writer),
                                    new DebugCharacterEncoder());
        try {
            outputter.output(top);
        } catch (IOException e){
            fail("Failed with "+e.toString());
View Full Code Here

        buffer = new TestDOMOutputBuffer();
        buffer.clear();
        vdStyleFactory = new VDXMLStyleFactory();
        writer = new CharArrayWriter();
        docWriter = new VDXMLDocumentWriter(new XMLDocumentWriter(writer));
        outputter = new DOMDocumentOutputter(
                docWriter, new DebugCharacterEncoder());
        empty = StylesBuilder.getEmptyStyles();
        transformer = new VDXMLBlockTransformer();
        builder = new ProtocolBuilder();
View Full Code Here

            String prefix) {
        if (logger.isDebugEnabled()) {
            try {
                StringWriter writer = new StringWriter();
                DOMDocumentOutputter outputter = new DOMDocumentOutputter(
                        new XMLDocumentWriter(writer),
                        protocol.getCharacterEncoder());
                // Tell the outputter to display null elements so we can
                // eliminate them more easily - null element names are evil!
                outputter.setDebugNullElementNames(true);
View Full Code Here

        return false;
    }

    // Javadoc inherited.
    public DocumentWriter createDocumentWriter(Writer writer) {
        return new XMLDocumentWriter(writer, this);
    }
View Full Code Here

    public static String toString(Document dom, CharacterEncoder encoder)
            throws IOException {

        StringWriter writer = new StringWriter();
        DOMDocumentOutputter outputter = new DOMDocumentOutputter(
                new XMLDocumentWriter(writer), encoder);

        outputter.output(dom);

        return writer.toString();
    }
View Full Code Here

    private String debug(Executor executor) {

        StringWriter writer = new StringWriter();
        DOMDocumentOutputter outputter = new DOMDocumentOutputter(
            new XMLDocumentWriter(writer), encoder);

        try {
            executor.execute(outputter);
        } catch (IOException e) {
            throw new ExtendedRuntimeException(e);
View Full Code Here

            // We need to render the content of the anchor as a string.
            Object contentObject = attributes.getContent();
            if (contentObject instanceof DOMOutputBuffer) {
                StringWriter contentWriter = new StringWriter();
                DocumentOutputter outputter = new DOMDocumentOutputter(
                        new XMLDocumentWriter(contentWriter),
                        characterEncoder);


                DOMOutputBuffer contentBuffer = (DOMOutputBuffer) contentObject;
                Element contentRoot = contentBuffer.getRoot();
View Full Code Here

    }

    // javadoc inherited
    public DocumentOutputter createDocumentOutputter(Writer writer) {
        return new DOMDocumentOutputter(
                new VDXMLDocumentWriter(new XMLDocumentWriter(writer)),
                getCharacterEncoder());
    }
View Full Code Here

TOP

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

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.