Examples of EmbeddedSAXPipe


Examples of org.apache.cocoon.xml.sax.EmbeddedSAXPipe

            if (node.getNodeType() == Node.DOCUMENT_NODE) {
                // Pass all SAX events
                handler = contentHandler;
            } else {
                // Strip start/endDocument
                handler = new EmbeddedSAXPipe(contentHandler);
            }

            SAXResult result = new SAXResult(handler);
            result.setLexicalHandler(lexicalHandler);
View Full Code Here

Examples of org.apache.cocoon.xml.sax.EmbeddedSAXPipe

        try {
            URL source = this.createSource(sourceAtt);

            XMLReader xmlReader = XMLReaderFactory.createXMLReader();
            EmbeddedSAXPipe embeddedSAXPipe = new EmbeddedSAXPipe(this.getSAXConsumer());
            xmlReader.setContentHandler(embeddedSAXPipe);
            xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", embeddedSAXPipe);

            BufferedInputStream inputStream = new BufferedInputStream(source.openStream());
            xmlReader.parse(new InputSource(inputStream));
View Full Code Here

Examples of org.apache.cocoon.xml.sax.EmbeddedSAXPipe

            properties.put("method", "xml");
            transformerHandler.getTransformer().setOutputProperties(properties);
            transformerHandler.setResult(new StreamResult(outputStream));

            transformerHandler.startDocument();
            saxBuffer.toSAX(new EmbeddedSAXPipe(transformerHandler));
            transformerHandler.endDocument();
        } catch (Exception e) {
            throw new ProcessingException("Can't stream the provided SaxBuffer.", 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.