Examples of nodelist()


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

      // Execute the XPath, and have it return the result
      XObject list = eval(contextNode, xpathnode, 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

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

    // Execute the XPath, and have it return the result
    XObject list = eval(contextNode, 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

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

    // Execute the XPath, and have it return the result
    XObject list = eval(contextNode, 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

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

    {
        String val = null;
       XObject xObject = XPathAPI.eval(d, query);
        final int objectType = xObject.getType();
        if (objectType == XObject.CLASS_NODESET) {
          NodeList matches = xObject.nodelist();
      int length = matches.getLength();
          vars.put(concat(refName,MATCH_NR), String.valueOf(length));
          for (int i = 0 ; i < length; i++) {
              Node match = matches.item(i);
        if ( match instanceof Element){
View Full Code Here

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

    final String pathString = getXPathString();
    try {
      XObject xObject = XPathAPI.eval(doc, pathString);
      switch (xObject.getType()) {
        case XObject.CLASS_NODESET:
          nodeList = xObject.nodelist();
          break;
        case XObject.CLASS_BOOLEAN:
          if (!xObject.bool()){
            result.setFailure(!isNegated());
            result.setFailureMessage("No Nodes Matched " + pathString);
View Full Code Here

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

        int numItems = 0;
        if (!(xOb instanceof XNodeSet))
        // then we only have a single (probably atomic) item.
            numItems = 1;
        else {
            nodeList = xOb.nodelist();
            numItems = nodeList.getLength();
        }

        // Return a list of the items contained in the query results.
        ArrayList itemRefs = new ArrayList();
View Full Code Here

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

     * @return {@link NodeList}
     * @throws TransformerException
     */
    public static NodeList selectNodeList(Document document, String xPathExpression) throws TransformerException {
        XObject xObject = XPathAPI.eval(document, xPathExpression, getPrefixResolver(document));
        return xObject.nodelist();
    }

    /**
     * Put in matchStrings results of evaluation
     * @param document XML document
View Full Code Here

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

            List<String> matchStrings, boolean fragment) throws TransformerException {
        String val = null;
        XObject xObject = XPathAPI.eval(document, xPathQuery, getPrefixResolver(document));
        final int objectType = xObject.getType();
        if (objectType == XObject.CLASS_NODESET) {
            NodeList matches = xObject.nodelist();
            int length = matches.getLength();
            for (int i = 0 ; i < length; i++) {
                Node match = matches.item(i);
                if ( match instanceof Element){
                    if (fragment){
View Full Code Here

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

            boolean isNegated) {
        try {
            XObject xObject = XPathAPI.eval(doc, xPathExpression, getPrefixResolver(doc));
            switch (xObject.getType()) {
                case XObject.CLASS_NODESET:
                    NodeList nodeList = xObject.nodelist();
                    if (nodeList == null || nodeList.getLength() == 0) {
                        if (log.isDebugEnabled()) {
                            log.debug(new StringBuilder("nodeList null no match  ").append(xPathExpression).toString());
                        }
                        result.setFailure(!isNegated);
View Full Code Here

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

     throws TransformerException
    {
        String val = null;
       XObject xObject = XPathAPI.eval(d, query);
        if (xObject.getType() == XObject.CLASS_NODESET) {
          NodeList matches = xObject.nodelist();
      int length = matches.getLength();
          vars.put(concat(refName,MATCH_NR), String.valueOf(length));
          for (int i = 0 ; i < length; i++) {
              Node match = matches.item(i);
        if ( match instanceof Element){
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.