Package org.apache.cocoon.core.xml

Examples of org.apache.cocoon.core.xml.SAXParser


            // TODO: LG, I do not see a good way to do this.
            if (BooleanUtils.isTrue(this.xmlize)) {
                if (val instanceof Node || val instanceof Node[] || val instanceof XMLizable)
                    Invoker.executeNode(consumer, val, stripRoot);
                else {
                    SAXParser parser = executionContext.getSaxParser();
                    InputSource source = new InputSource(new ByteArrayInputStream(val.toString().getBytes()));
                    IncludeXMLConsumer includeConsumer = new IncludeXMLConsumer(consumer);
                    includeConsumer.setIgnoreRootElement(stripRoot);
                    parser.parse(source, includeConsumer);
                }
            } else
                Invoker.executeNode(consumer, val, stripRoot);
        } catch (Exception e) {
            throw new SAXParseException(e.getMessage(), getLocation(), e);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.core.xml.SAXParser

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.