Package com.volantis.mcs.dom.output

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


    private String getMarkup(DOMOutputBuffer buffer){
        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());
        }
        return writer.toString();
    }
View Full Code Here


    private String getMarkup(DOMOutputBuffer buffer){
        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());
        }
        return writer.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();
        protocol = (DOMProtocol) builder.build(
View Full Code Here

            Document document,
            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);

                outputter.output(document);

                logger.debug(prefix + ": " + writer.toString());
            } catch (Exception e) {
                logger.debug("Failed to log the transformer DOM", e);
            }
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

     * @return a String representing the dom object hierarchy content
     */
    public static String toString(Element element, CharacterEncoder encoder) {

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

        try {
            outputter.output(element);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }


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) {
View Full Code Here

        return document;
    }

    public String render(Document document) {
        StringWriter writer = new StringWriter();
        DOMDocumentOutputter outputter = createOutputter(writer);
        try {
            outputter.output(document);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return writer.toString();
    }
View Full Code Here

        }
        return writer.toString();
    }

    private DOMDocumentOutputter createOutputter(StringWriter writer) {
        DOMDocumentOutputter outputter = new DOMDocumentOutputter(
            new StyledDocumentWriter(writer, interestingProperties,
                    onlyExplicitlySpecified),
                new DebugCharacterEncoder());
        return outputter;
    }
View Full Code Here

        return outputter;
    }

    public String render(Element element) {
        StringWriter writer = new StringWriter();
        DOMDocumentOutputter outputter = createOutputter(writer);
        try {
            outputter.output(element);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return writer.toString();
    }
View Full Code Here

TOP

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

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.