Package com.volantis.mcs.dom

Examples of com.volantis.mcs.dom.NodeSequence


        StrictStyledDOMHelper helper = new StrictStyledDOMHelper(null);

        String result;
        final Document doc = domFactory.createDocument();
        NodeSequence contents = buffer.removeContents();
        contents.forEach(new NodeIteratee() {
            public IterationAction next(Node node) {
                doc.addNode(node);
                return IterationAction.CONTINUE;
            }
        });
View Full Code Here


        if (CHECK_INVARIANTS) {
            checkInvariants();
        }

        NodeSequence children;
        if (head == null) {
            children = EmptyNodeSequence.INSTANCE;
        } else {
            children = new NodeSequenceImpl(head, tail);
View Full Code Here

        // Add an element.
        buffer.addElement("a");

        // Add a sequence.
        NodeSequence nodes = DOMUtilities.readSequence("<b/><c/>");
        buffer.addNodeSequence(nodes);

        // Add an element.
        buffer.addElement("d");
        String actual = DOMUtilities.toString(buffer.getRoot());
View Full Code Here

         * Insert the caption buffer's root element after the stored caption node.
         * @param node the node to insertAfter.
         */
        public void insertAfterEntryNode(Node node) {
            if (node != null) {
                NodeSequence children = entryPaneBuffer.removeContents();
               
                node.getParent().insertAfter(children, node);
            }
        }
View Full Code Here

         * Insert the caption buffer's root element after the stored caption node.
         * @param node the node to insertAfter.
         */
        public void insertAfterCaptionNode(Node node) {
            if (node != null) {
                NodeSequence children = captionPaneBuffer.removeContents();
               
                node.getParent().insertAfter(children, node);
            }
        }
View Full Code Here

     */
    public void addOutputBuffer(DOMOutputBuffer buffer) {

        // avoid NullPointerException
        if (buffer != null) {
            NodeSequence nodes = buffer.removeContents();
            addNodeSequence(nodes);
        }
    }
View Full Code Here

     * <p>The returned sequence is not live.</p>
     *
     * @return The contents of the buffer as a sequence of nodes.
     */
    public NodeSequence removeContents() {
        NodeSequence contents = root.removeChildren();
        resetPosition();
        return contents;
    }
View Full Code Here

        DOMOutputBuffer currentBuffer = (DOMOutputBuffer)
                outputBufferStack.getCurrentOutputBuffer();

        // Get the contents from the region buffer and add them into the
        // current buffer.
        NodeSequence nodes = outputBuffer.removeContents();
        currentBuffer.addNodeSequence(nodes);

        if (containsNestedContent) {
            // Iterate over the nodes that have been added to
            DOMWalker walker = new DOMWalker(new RegionContentVisitor(context));
View Full Code Here

                // Pop the temporary buffer of the stack.
                outputBufferStack.popOutputBuffer(buffer);

                // Replace the current element with the contents of the
                // temporary buffer.
                NodeSequence sequence = buffer.removeContents();
                element.replaceWith(sequence);
            }
        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom.NodeSequence

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.