Examples of nodeset()


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

      {
         final XObject xobj = xobjs[i];

         if ( xobj.getType(  ) == XObject.CLASS_NODESET )
         {
            NodeIterator nodeIter = xobj.nodeset(  );

            for ( Node node = nodeIter.nextNode(  ); node != null; node = nodeIter.nextNode(  ) )
            {
               final Element elem = (Element) node;
               nodes.add( SaajUtils.toSOAPElement( elem ) );
View Full Code Here

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

                    default :
                        throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED,
                                                 "Unsupported result type: " + xobject.getTypeString());

                    case XObject.CLASS_NODESET:
                        ni = xobject.nodeset();
                        node = ni.nextNode();
                        break;

                    case XObject.CLASS_BOOLEAN:
                        ni = EMPTY_NODE_ITERATOR;
View Full Code Here

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

            }
            public boolean handlesNullPrefixes() {
                return false;
            }
        });
        Node root = list.nodeset().nextNode();
        if (root instanceof Element) {
            Element element = (Element) root;
            if (element == null) {
                return "";
            }
View Full Code Here

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

          return result.num();
        case XObject.CLASS_STRING:
          return result.str();
        case XObject.CLASS_NODESET:
          if (_onlyFirstResult)
            return result.nodeset().nextNode();
          else
            return toList(result.nodeset());
        default:
          throw new RuntimeException("Unexpected result type for >" + _xpath
              + "<: " + result.getType());
View Full Code Here

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

          return result.str();
        case XObject.CLASS_NODESET:
          if (_onlyFirstResult)
            return result.nodeset().nextNode();
          else
            return toList(result.nodeset());
        default:
          throw new RuntimeException("Unexpected result type for >" + _xpath
              + "<: " + result.getType());
      }
    }
View Full Code Here

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

          //       which may not match the javaClass, causing a RuntimeException.
          // if((NodeIterator.class.isAssignableFrom(javaClass)) ||
          if ( (javaClass == NodeIterator.class) ||
               (javaClass == java.lang.Object.class) )
          {
            return xobj.nodeset();
          }
          // Same comment as above
          // else if(NodeList.class.isAssignableFrom(javaClass))
          else if(javaClass == NodeList.class)
          {
View Full Code Here

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

          // else if(Node.class.isAssignableFrom(javaClass))
          else if(javaClass == Node.class)
          {
            // Xalan ensures that nodeset() always returns an
            // iterator positioned at the beginning.
            NodeIterator ni = xobj.nodeset();
            return ni.nextNode(); // may be null.
          }
          else if(javaClass == java.lang.String.class)
          {
            return xobj.str();
View Full Code Here

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

          {
            return convertDoubleToNumber(xobj.num(), javaClass);
          }
          else
          {
            Node child = xobj.nodeset().nextNode();
            if(javaClass.isAssignableFrom(child.getClass()))
              return child;
            else
              return null;
          }
View Full Code Here

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

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

    // Have the XObject return its result as a NodeSet.
    return list.nodeset();
  }

  /**
   *  Use an XPath string to select a nodelist.
   *  XPath namespace prefixes are resolved from the contextNode.
View Full Code Here

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

      if (rdebug)
        transformer.getTraceManager().fireSelectedEvent(sourceNode, this,
                                                        "test", selectPattern, selectResult);
     
      Vector keys = transformer.processSortKeys(this, sourceNode);
      NodeIterator sourceNodes = selectResult.nodeset();

      // Sort if we need to.
      if (null != keys)
        sourceNodes = sortNodes(xctxt, keys, sourceNodes);
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.