Package net.sf.saxon.tinytree

Examples of net.sf.saxon.tinytree.TinyBuilder


    /**
     * Build a Saxon "tiny" tree from input supplied via the pull interface
     */

    public NodeInfo build(PullProvider in) throws XPathException {
        TinyBuilder builder = new TinyBuilder();
        builder.setPipelineConfiguration(in.getPipelineConfiguration());
        new PullPushCopier(in, builder).copy();
        return builder.getCurrentRoot();
    }
View Full Code Here


        Transformer transformer = templates.newTransformer();
        doc = new XPathEvaluator().setSource(new StreamSource(new File(sourceID).toURL().toString()));
        System.err.println("Source document built OK");

        TinyBuilder builder = new TinyBuilder();
        transformer.transform(doc, builder);
        System.err.println("Transformation done OK");

        // Serialize the output so we can see the transformation actually worked
        Transformer serializer = tfactory.newTransformer();
        serializer.transform(builder.getCurrentRoot(), new StreamResult(System.out));

        return builder.getCurrentRoot();

    }
View Full Code Here

        xpath.setSource(new StreamSource(new File(sourceID).toURL().toString()));
        NodeInfo node = (NodeInfo)xpath.evaluateSingle("/*/*[1]");

        System.err.println("Source document built OK");

        TinyBuilder builder = new TinyBuilder();
        transformer.transform(node, builder);
        System.err.println("Transformation done OK");

        // Serialize the output so we can see the transformation actually worked
        Transformer serializer = tfactory.newTransformer();
        serializer.transform(builder.getCurrentRoot(), new StreamResult(System.out));

        return builder.getCurrentRoot();
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.tinytree.TinyBuilder

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.