Package net.sf.saxon.xpath

Examples of net.sf.saxon.xpath.XPathEvaluator


     */
    public List selectNodes(Object node)
    {
        try
        {
            XPathEvaluator xpe = new XPathEvaluator(new DOMSource((Node) node));
            XBeansStandaloneContext sc = new XBeansStandaloneContext();
            xpe.setStaticContext(sc);

            // Declare ns bindings
            if (defaultNS != null)
                sc.setDefaultElementNamespace(defaultNS);

            for (int i = 0; i < namespaceMap.length; i++)
            {
                Map.Entry entry = (Map.Entry) namespaceMap[i];
                sc.declareNamespace((String) entry.getKey(),
                        (String) entry.getValue());
            }
              return xpe.evaluate(_queryExp);
        }
        catch (XPathException e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

TOP

Related Classes of net.sf.saxon.xpath.XPathEvaluator

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.