| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.actf.model.dom.html.NodeUtil
public class NodeUtil
Utility class to manipulate Node
| Constructor Summary | |
|---|---|
| NodeUtil() | |
| Method Summary | |
|---|---|
| static void | add(Node parent,
    Node node,
    Node from,
    Node to)Adds nodeand moves children specified byfromandtoto it. | 
| static Node | commonAncestor(org.w3c.dom.html.HTMLCollection ancestors)Find common ancestor Nodeof targets | 
| static Node | commonAncestor(Node anc1,
               Node anc2)Find common ancestor Nodeof targets | 
| static void | remove(Node node)Replaces nodewith its children. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public NodeUtil()
| Method Detail | 
|---|
public static Node commonAncestor(Node anc1,
                                  Node anc2)
Node of targets
anc1 - target Node 1anc2 - target Node 2
Node or null if not availablepublic static void remove(Node node)
node with its children. The following is an
 example:
 
 
      R          R     
    / \        /|\    
   A   B  ->  A E F   
      / \             
     E   F            
                      
      remove B        
 
node - target node.
IllegalArgumentException
public static void add(Node parent,
                       Node node,
                       Node from,
                       Node to)
node and moves children specified by
 from and to to it. The following is an
 example:
 
 
      R         R       
     /|\       / \      
    A E F  -> A   B     
                 / \    
                E   F   
                        
     add B ...          
 
parent - target parent nodenode - target nodefrom - beginning of the children moved to node. If
            null, no child will be moved.to - end of the children moved to node
IllegalArgumentExceptionpublic static Node commonAncestor(org.w3c.dom.html.HTMLCollection ancestors)
Node of targets
ancestors - list of target Nodes
Node or null if not available| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||