Package org.w3c.dom.traversal

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


        }
        // 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


      // Have the XObject return its result as a NodeSetDTM.
      NodeIterator nl = selectNodeIterator(contextNode, xpathnode,
                                           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

     * @throws TransformerException
     */
    protected String textValueOfXPath(Node node, String xpath) throws TransformerException {
        CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
        NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, xpath);
        Node root = iterator.nextNode();
        if (root instanceof Element) {
            Element element = (Element) root;
            if (element == null) {
                return "";
            }
View Full Code Here

    }
   
    protected String textValueOfXPath(Node node, String xpath) throws TransformerException {
        CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
        NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, xpath);
        Node root = iterator.nextNode();
        if (root instanceof Element) {
            Element element = (Element) root;
            if (element == null) {
                return "";
            }
View Full Code Here

    }
   
    protected String textValueOfXPath(Node node, String xpath) throws TransformerException {
        CachedXPathAPI cachedXPathAPI = new CachedXPathAPI();
        NodeIterator iterator = cachedXPathAPI.selectNodeIterator(node, xpath);
        Node root = iterator.nextNode();
        if (root instanceof Element) {
            Element element = (Element) root;
            if (element == null) {
                return "";
            }
View Full Code Here

                }

                for (int i = 0; i < xPaths.length; i++) {
                    NodeIterator iter = XPathAPI.selectNodeIterator(xml, xPaths[i]);
                    Node node;
                    while ((node = iter.nextNode()) != null) {
                        Attr attr = (Attr) node;
                        String uri = attr.getValue();
                        if (isLinkUri(uri)) {
                            links.add(new Link(uri));
                        }
View Full Code Here

      // fetch list of referenced modes
      NodeIterator ii = dt.createNodeIterator(template,
        NodeFilter.FILTER_ACCEPT,
        new ModeFilter(), false);
      Node oo;
      while((oo = ii.nextNode()) != null) {
        Element ee = (Element) oo;
        modes.add(ee.getAttribute("mode"));
      }
      for(String mm : modes) {
        // get a list of all modes referred to
View Full Code Here

        // get a list of all modes referred to
        NodeIterator jj = dt.createNodeIterator(templateLibrary,
            NodeFilter.FILTER_ACCEPT,
            new ModeTemplateFilter(mm), false);
        Node pp;
        while((pp = jj.nextNode()) != null) {
          fragment.appendChild(
            loadTemplateRecurse((Element) pp, templatesLoaded));
        }
       }
     
View Full Code Here

        String n = el.getAttribute("name");
        NodeIterator it = dt.createNodeIterator(templateLibrary,
          NodeFilter.FILTER_ACCEPT,
          new TemplateFilter(n), false);
        Element ee;
        while((ee = (Element) it.nextNode()) != null) {
          fragment.appendChild(
              loadTemplateRecurse(ee, templatesLoaded));
        }
      }
     
View Full Code Here

      templatesLoaded = new HashSet<String>();
      stylesheet.setUserData("external-stylesheets",templatesLoaded,null);
    }
   
    boolean loaded = false;
    while((nn = it.nextNode())!= null) {
      loaded = true;
      fragment.appendChild(
        loadTemplateRecurse((Element)nn, templatesLoaded));
    }
    stylesheet.getOwnerDocument().adoptNode(fragment);
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.