Package org.w3c.dom.traversal

Examples of org.w3c.dom.traversal.NodeIterator.nextNode()


    if (tagName.length() == 1 && tagName.charAt(0) == '*') {
      tagName = null; // do not care
    }

    for (Node node = it.nextNode(); node != null; node = it.nextNode()) {
      if (node.getNodeType() != ELEMENT_NODE)
        continue;
      if (tagName != null) {
        ElementImpl element = (ElementImpl) node;
        if (!element.matchTagName(tagName))
View Full Code Here


        }
        // XPathConstants.NODE
        if ( returnType.equals( XPathConstants.NODE ) ) {
            NodeIterator ni = resultObject.nodeset();
            //Return the first node, or null
            return ni.nextNode();
        }
        // If isSupported check is already done then the execution path
        // shouldn't come here. Being defensive
        String fmsg = XSLMessages.createXPATHMessage(
                XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE,
View Full Code Here

        }
        // XPathConstants.NODE
        if ( returnType.equals( XPathConstants.NODE ) ) {
            NodeIterator ni = resultObject.nodeset();
            //Return the first node, or null
            return ni.nextNode();
        }
        String fmsg = XSLMessages.createXPATHMessage(
                XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE,
                new Object[] { returnType.toString()});
        throw new IllegalArgumentException( fmsg );
View Full Code Here

      throw new XPathException(XPathException.TYPE_ERR,te.getMessage());
    }
       
        if (null == result) return null;
       
        Node node = result.nextNode();
        
        // Wrap "namespace node" in an XPathNamespace
        if (isNamespaceNode(node)) {
            return new XPathNamespaceImpl(node);
        } else {
View Full Code Here

      throw new XPathException(XPathException.TYPE_ERR,te.getMessage());
    }
       
        if (null == result) return null;
       
        Node node = result.nextNode();
        
        // Wrap "namespace node" in an XPathNamespace
        if (isNamespaceNode(node)) {
            return new XPathNamespaceImpl(node);
        } else {
View Full Code Here

    // Have the XObject return its result as a NodeSetDTM.
    NodeIterator nl = selectNodeIterator(contextNode, str, namespaceNode);

    // Return the first node, or null
    return nl.nextNode();
  }

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

    // Have the XObject return its result as a NodeSetDTM.
    NodeIterator nl = selectNodeIterator(contextNode, str, namespaceNode);

    // Return the first node, or null
    return nl.nextNode();
  }

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

                return NodeFilter.FILTER_REJECT;
              }
            }, false);
   
    Map<PipelinedData, Node> pipelineNodes = Maps.newHashMap();
    for (Node n = nodeIterator.nextNode(); n != null ; n = nodeIterator.nextNode()) {
      try {
        PipelinedData pipelineData = new PipelinedData((Element) n, gadget.getSpec().getUrl());
        pipelineNodes.put(pipelineData, n);
      } catch (SpecParserException e) {
        // Leave the element to the client
View Full Code Here

                return NodeFilter.FILTER_REJECT;
              }
            }, false);
   
    Map<PipelinedData, Node> pipelineNodes = Maps.newHashMap();
    for (Node n = nodeIterator.nextNode(); n != null ; n = nodeIterator.nextNode()) {
      try {
        PipelinedData pipelineData = new PipelinedData((Element) n, gadget.getSpec().getUrl());
        pipelineNodes.put(pipelineData, n);
      } catch (SpecParserException e) {
        // Leave the element to the client
View Full Code Here

        }
        // XPathConstants.NODE
        if ( returnType.equals( XPathConstants.NODE ) ) {
            NodeIterator ni = resultObject.nodeset();
            //Return the first node, or null
            return ni.nextNode();
        }
        // If isSupported check is already done then the execution path
        // shouldn't come here. Being defensive
        String fmsg = XSLMessages.createXPATHMessage(
                XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE,
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.