Enhydra 3.1.1b1 API

org.enhydra.xml.dom
Class DOMOps

java.lang.Object
  |
  +--org.enhydra.xml.dom.DOMOps

public final class DOMOps
extends java.lang.Object

Various static methods the do simple operations on the DOM.


Method Summary
static int countChildren(Node node)
          Count the number of children in a node has.
static Node getActualNode(Node node)
          Get the real DOM node, bypassing an XMLC-generated container.
static Document getDocument(Node node)
          Get the owner document object for a node.
static boolean isLazyDOMInstance(Document doc)
          Determine if a document is a LazyDOM instance document.
static Node replaceNode(Node srcNode, Node destNode)
          Replace a node with one imported from another document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDocument

public static Document getDocument(Node node)
Get the owner document object for a node. This gets the actual document. If a XMLC document class instance the contained document is returned.

getActualNode

public static Node getActualNode(Node node)
Get the real DOM node, bypassing an XMLC-generated container. If a XMLC document class instance the contained document is returned. Otherwise the node is returned.

replaceNode

public static Node replaceNode(Node srcNode,
                               Node destNode)
Replace a node with one imported from another document.
Parameters:
srcNode - The node to clone and insert
destNode - The node to be replaced
Returns:
The new node that replaces the destination node.

countChildren

public static int countChildren(Node node)
Count the number of children in a node has.

isLazyDOMInstance

public static boolean isLazyDOMInstance(Document doc)
Determine if a document is a LazyDOM instance document.
Returns:
true if its a LazyDOM instance, false if its a LazyDOM template or not a LazyDOM at all.

Enhydra 3.1.1b1 API