Package com.volantis.mcs.wbdom.io

Examples of com.volantis.mcs.wbdom.io.WBSAXParser


        // This will serialise the DOM to WBSAX events.
        SerialisationConfiguration configuration = createConfiguration();
        WBSAXSerialiser serialiser = new WBSAXSerialiser(producer,
                configuration, urlListener);
        return new TestWBDOMWBSAXFilter(
                new WBSAXParser(new DefaultWBDOMFactory(), configuration),
                serialiser);
    }
View Full Code Here


        // This will serialise the DOM to WBSAX events.
        SerialisationConfiguration configuration = createConfiguration();
        WBSAXSerialiser serialiser = new WBSAXSerialiser(producer,
                configuration, urlListener);
        return new TestWBDOMWBSAXFilter(
                new WBSAXParser(new DefaultWBDOMFactory(), configuration),
                serialiser);
    }
View Full Code Here

        // Factory to create dissection WBDOM nodes.
        DissectableWBDOMFactory dissectionFactory =
            new DissectableWBDOMFactory(wmlConfiguration);
        // Handler to parse WBSAX events into WBDOM nodes.
        WBSAXParser parser = new DissectionWBSAXParser(dissectionFactory,
                                                       wmlConfiguration);
        StringWriter out = null;
        try {
            if (logger.isDebugEnabled()) {
                out = new StringWriter();
                handler = new WBSAXDisassembler(parser, out);
            } else {
                handler = parser;
            }

            // Plugin optimiser
            optimiser = new URLOptimiser(handler);
            optimiser.setPageContext(getMarinerPageContext());
            if (logger.isDebugEnabled()) {
                out = new StringWriter();
                filter = new WBSAXDisassembler(optimiser, out);
            } else {
                filter = optimiser;
            }

            processorContext.setContentHandler(filter);
            wbsaxOutputter.output(document);
        } finally {
            if (logger.isDebugEnabled()) {
                out.flush();
                logger.debug(out);
            }
        }

        try {
            if (logger.isDebugEnabled()) {
                out = new StringWriter();
                handler = new WBSAXDisassembler(producer, out);
            } else {
                handler = producer;
            }
           
            super.writeViaDissection(
                    new WBDOMDissectableDocument(parser.getDocument()),
                    new WBDOMDissectedContentHandler(handler, wmlConfiguration, urlListener));
           
        } finally {
            if (logger.isDebugEnabled()) {
                out.flush();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.wbdom.io.WBSAXParser

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.