Package com.volantis.mcs.dom.output

Examples of com.volantis.mcs.dom.output.DocumentOutputter.output()


            DTD dtd = builder.buildDTD();

            DocumentOutputter outputter = new DOMDocumentOutputter(
                dtd.createDocumentWriter(writer), getCharacterEncoder());

            outputter.output(outputBuffer.getRoot());

            preContent = writer.toString();
            boolean requiresSub = false;
            int startIndex = 0;
            int endIndex = preContent.length();
View Full Code Here



                DOMOutputBuffer contentBuffer = (DOMOutputBuffer) contentObject;
                Element contentRoot = contentBuffer.getRoot();
                try {
                    outputter.output(contentRoot);
                    content = contentWriter.getBuffer().toString();
                } catch (IOException ioe) {
                    logger.error("content-generation-error", ioe);
                }
            } else {
View Full Code Here

                    StringWriter writer = new StringWriter();

                    DocumentOutputter outputter = protocol.createDocumentOutputter(writer);

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

                    // Create text node with serialized string.
View Full Code Here

        Writer writer = new OutputStreamWriter(System.out);
        CharacterEncoder encoder = getCharacterEncoder();
        DocumentOutputter outputter = new DOMDocumentOutputter(
            new XMLDocumentWriter(writer), encoder);
        try {
            outputter.output(root);
            writer.flush();
            System.out.println();
        } catch (IOException e) {
            logger.error("dom-outputting-error", new Object[]{dom}, e);
        }
View Full Code Here

     * @throws IOException
     */
    private void writeDocument(final Document document, final Writer writer)
            throws IOException {
        DocumentOutputter documentOutputter = createDocumentOutputter(writer);
        documentOutputter.output(document);
        documentOutputter.flush();
    }

    /**
     * Logs the contents of {@link #document} as the page output, if page
View Full Code Here

        DocumentOutputter outputter = new DOMDocumentOutputter(
            dtd.createDocumentWriter(writer), getCharacterEncoder());

        try {
            outputter.output(dom.getRoot());
            content = writer.toString();

            if (debug) {
                writeLogicalContent("<<");
            }
View Full Code Here

        DocumentOutputter outputter = new DOMDocumentOutputter(
            dtd.createDocumentWriter(writer), getCharacterEncoder());

        try {
            outputter.output(prevOutputBuffer.getRoot());
            content = writer.toString();
        } catch (IOException e) {
            if (logger.isDebugEnabled()) {
                logger.debug("Could not add content of pre tag to output" +
                        " because of an unexpected Exception: ", e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.