Package net.sf.saxon.sxpath

Examples of net.sf.saxon.sxpath.XPathExpression.evaluate()


                config.unravel(new DOMSource(contextNode));
            XPathDynamicContext dc = xpath.createDynamicContext(null);
            dc.setContextItem(contextItem);
            dc.setVariable(thisVar, contextItem);

            List saxonNodes = xpath.evaluate(dc);
            for (ListIterator it = saxonNodes.listIterator(); it.hasNext(); )
            {
                Object o = it.next();
                if (o instanceof NodeInfo)
                {
View Full Code Here


            XPathExpression exp = xpe.createExpression(_queryExpr);

            // After 8.3(?) Saxon nodes no longer implement Dom.
            // The client needs saxon8-dom.jar, and the code needs
            // this NodeOverNodeInfo Dom wrapper doohickey
            List saxonNodes = exp.evaluate(rootNode);
            for (ListIterator it = saxonNodes.listIterator(); it.hasNext();)
            {
                Object o = it.next();
                if(o instanceof NodeInfo)
                {
View Full Code Here

            Variable thisVar = sc.declareVariable("this");
            thisVar.setValue(rootNode);

            XPathExpression exp = xpe.createExpression(_queryExp);
            return exp.evaluate(rootNode);
        }
        catch (TransformerException e)
        {
            throw new RuntimeException(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.