Package org.w3c.dom.traversal

Examples of org.w3c.dom.traversal.DocumentTraversal


         // create empty set for results
         this.resultSet = new HashSet();

         {
            DocumentTraversal dt = ((DocumentTraversal) inputDoc);
            Node rootNode = (Node) inputDoc;

            // we accept all nodes
            NodeFilter nodefilter = new AlwaysAcceptNodeFilter();
            TreeWalker treewalker = dt.createTreeWalker(rootNode,
                                                        NodeFilter.SHOW_ALL,
                                                        nodefilter, true);

            /* do the magic here
             *
 
View Full Code Here


  private BeanDefinitionRegistry getBeanDefinitionRegistry() {
    return beanDefinitionRegistry != null ? beanDefinitionRegistry : getReaderContext().getRegistry();
  }

  private void transformDocument(Element root) {
    DocumentTraversal traversal = (DocumentTraversal) root.getOwnerDocument();
    NodeIterator iterator = traversal.createNodeIterator(root, NodeFilter.SHOW_ELEMENT, null, true);

    BeanDefinitionRegistry registry = getBeanDefinitionRegistry();
    Map<String, Integer> referenceCountMap = new HashMap<String, Integer>();

    for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
View Full Code Here

        }
        if (document instanceof OMDocument) {
            return ((OMDocument)document).getOMDocumentElement();
       
        } else {
        DocumentTraversal traversal = (DocumentTraversal) document;
        TreeWalker walker = traversal.createTreeWalker(
                ((Document)document).getDocumentElement(), NodeFilter.SHOW_ALL, null, true);
        return (OMElement) traverseDOMDocument(fac, walker, null);
        }
    }
View Full Code Here

         // create empty set for results
         this.resultSet = new HashSet();

         {
            DocumentTraversal dt = ((DocumentTraversal) inputDoc);
            Node rootNode =  inputDoc;

            // we accept all nodes
            NodeFilter nodefilter = new AlwaysAcceptNodeFilter();
            TreeWalker treewalker = dt.createTreeWalker(rootNode,
                                                        NodeFilter.SHOW_ALL,
                                                        nodefilter, true);

            /* do the magic here
             *
 
View Full Code Here

         // create empty set for results
         this.resultSet = new HashSet();

         {
            DocumentTraversal dt = ((DocumentTraversal) inputDoc);
            Node rootNode =  inputDoc;

            // we accept all nodes
            NodeFilter nodefilter = new AlwaysAcceptNodeFilter();
            TreeWalker treewalker = dt.createTreeWalker(rootNode,
                                                        NodeFilter.SHOW_ALL,
                                                        nodefilter, true);

            /* do the magic here
             *
 
View Full Code Here

TOP

Related Classes of org.w3c.dom.traversal.DocumentTraversal

Copyright © 2018 www.massapicom. 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.