Package com.volantis.xml.pipeline.sax

Examples of com.volantis.xml.pipeline.sax.XMLProcessImpl


        try {
            // This handler allows a string value to be collated from the value's
            // SAX events. An exception will be thrown by this handler if any
            // non-simple events are encountered
            XMLProcess handler = new XMLProcessImpl() {
                /**
                 * Used to generate a standardized fatal error message.
                 *
                 * @param event the name of the SAX event in which the error
                 *              occurred
View Full Code Here


        XMLReader parser = XMLReaderFactory.createXMLReader(false);
        XMLFilterImpl xmlFilter = new XMLFilterImpl(parser);
        HTMLResponseConditioner conditioner = new HTMLResponseConditioner(xmlFilter);


        XMLProcessImpl xmlProcess = new XMLProcessImpl() {
            public void setDocumentLocator(Locator locator) {
                XMLProcess consumer = getConsumerProcess();
                if (null != consumer) {
                    consumer.setDocumentLocator(locator);
                }
            }

            public void startDocument() throws SAXException {
                XMLProcess consumer = getConsumerProcess();
                if (null != consumer) {
                    consumer.startDocument();
                }
            }

            public void endDocument() throws SAXException {
                XMLProcess consumer = getConsumerProcess();
                if (null != consumer) {
                    consumer.endDocument();
                }
            }

            // Javadoc inherited
            public void startPrefixMapping(String prefix, String uri)
                    throws SAXException {
                XMLProcess consumer = getConsumerProcess();
                if (null != consumer) {
                    consumer.startPrefixMapping(prefix, uri);
                }
            }

            // Javadoc inherited
            public void endPrefixMapping(String prefix) throws SAXException {
                XMLProcess consumer = getConsumerProcess();
                if (null != consumer) {
                    consumer.endPrefixMapping(prefix);
                }
            }
        };
        xmlProcess.setNextProcess(adapter);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        byte[] buffer = new byte[2048];
        int readBytes = input.read(buffer);
        while (readBytes != -1) {
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.XMLProcessImpl

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.