Package org.apache.xpath.objects

Examples of org.apache.xpath.objects.XObject.nodelist()


      // Execute the XPath, and have it return the result
      XObject list = eval(contextNode, xpathnode, str, namespaceNode);

      // Return a NodeList.
      return list.nodelist();
   }

   /**
    *  Evaluate XPath string to an XObject.  Using this method,
    *  XPath namespace prefixes will be resolved from the namespaceNode.
View Full Code Here


    public NodeList selectNodeList(Node contextNode, String str, PrefixResolver resolver)
    {
        try
        {
            final XObject result = XPathAPI.eval( contextNode, str, new XalanResolver(resolver) );
            return result.nodelist();
        }
        catch( final TransformerException e )
        {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Failed to evaluate '" + str + "'", e);
View Full Code Here

    PrefixResolver resolver = new PrefixResolverDefault(contextNode);
    XPath xpath = createXPath(expr, resolver, type);
    XPathContext xpathContext = new XPathContext();
    XObject xobj = xpath.execute(xpathContext, contextNode, resolver);
    if (xobj != null) {
      return xobj.nodelist();
    }
    else {
      return null;
    }
  }
View Full Code Here

    throws TransformerException
  {
    XPathContext xpathContext = new XPathContext();
    XObject xobj = xpath.execute(xpathContext, contextNode, xpathContext.getNamespaceContext());
    if (xobj != null) {
      return xobj.nodelist();
    }
    else {
      return null;
    }
  }
View Full Code Here

  public static NodeList execute(XPathContext xpathContext, XPath xpath, Node contextNode)
    throws TransformerException
  {
    XObject xobj = xpath.execute(xpathContext, contextNode, xpathContext.getNamespaceContext());
    if (xobj != null) {
      return xobj.nodelist();
    }
    else {
      return null;
    }
  }
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.