Examples of stream()


Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

                                   atts);
                if (value_!=null) {
                    // stream back the recorder repeat content
                    DOMStreamer streamer = new DOMStreamer(this, this);

                    streamer.stream(docFragment);
                }

                super.endElement(NS, TAG_GROUP, NS_PREFIX+":"+TAG_GROUP);

            }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

                                   atts);
                if (value_!=null) {
                    // stream back the recorder repeat content
                    DOMStreamer streamer = new DOMStreamer(this, this);

                    streamer.stream(docFragment);
                }

                super.endElement(NS, TAG_ITEM, NS_PREFIX+":"+TAG_ITEM);

            }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

        domStreamer.setContentHandler(byteStreamCompiler);

        NodeList childNodes = element.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++) {
            try {
                domStreamer.stream(childNodes.item(i));
            } catch (SAXException e) {
                // It's unlikely that an exception will occur here, so use a runtime exception
                throw new RuntimeException("Error in DomHelper.compileElementContent: " + e.toString());
            }
        }
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

         attributes.addAttribute("", QUERY_ATTR, QUERY_ATTR, CDATA,
           XPathQuery);
         super.contentHandler.startElement(URI, RESULT, QRESULT, attributes);
         DOMStreamer ds = new DOMStreamer(super.xmlConsumer);
         for (int i = 0; i < nl.getLength(); i++)
           ds.stream(nl.item(i));
         super.contentHandler.endElement(URI, RESULT, QRESULT);
      }
    }

    /**
 
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

                contentHandler.startDocument();
                NodeList nl = processor.selectNodeList(doc, xpath);
                int length = nl.getLength();
                for(int i=0;i<length;i++)
                {
                    domStreamer.stream(nl.item(i));
                }
                contentHandler.endDocument();
            } else {
                DOMStreamer streamer = new DOMStreamer(this.contentHandler,this.lexicalHandler);
                streamer.stream(doc);
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

                    domStreamer.stream(nl.item(i));
                }
                contentHandler.endDocument();
            } else {
                DOMStreamer streamer = new DOMStreamer(this.contentHandler,this.lexicalHandler);
                streamer.stream(doc);
            }
        } catch (IOException e){
            throw new ResourceNotFoundException("Could not get resource "
                + this.inputSource.getURI(), e);
        } catch (SAXException e){
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

            DOMBuilder builder = new DOMBuilder();
            transformer.setConsumer(new WhitespaceFilter(builder));

            assertNotNull("Test if input document is not null", input);
            DOMStreamer streamer = new DOMStreamer(transformer);
            streamer.stream(input);

            document = builder.getDocument();
            assertNotNull("Test for transformer document", document);

        } catch (ComponentException ce) {
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

                        selector = (ComponentSelector)manager.lookup(Serializer.ROLE + "Selector");
                        serializer = (Serializer)selector.select(localSerializer);
                        oStream = ws.getOutputStream();
                        serializer.setOutputStream(oStream);
                        DOMStreamer streamer = new DOMStreamer(serializer);
                        streamer.stream(resource);
                    } finally {
                        if (oStream != null) {
                            oStream.flush();
                            try {
                                oStream.close();
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

            DOMBuilder builder = new DOMBuilder();
            transformer.setConsumer(new WhitespaceFilter(builder));

            assertNotNull("Test if input document is not null", input);
            DOMStreamer streamer = new DOMStreamer(transformer);
            streamer.stream(input);

            document = builder.getDocument();
            assertNotNull("Test for transformer document", document);

        } catch (ComponentException ce) {
View Full Code Here

Examples of org.apache.cocoon.xml.dom.DOMStreamer.stream()

            transformerHandler.setResult(new StreamResult(writer));
            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
                transformerHandler.startDocument();
            }
            DOMStreamer domStreamer = new DOMStreamer(transformerHandler, transformerHandler);
            domStreamer.stream(node);
            if ( node.getNodeType() != Node.DOCUMENT_NODE ) {
                transformerHandler.endDocument();
            }
            return writer.toString();
        } catch (javax.xml.transform.TransformerException local) {
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.