public final class NOMUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
deleteNode(org.w3c.dom.Node node)
Removes the cleanup responsibility from DOM wrapper and explicitly frees the underlying NOM memory of the XML tree.
|
static NOMHandle |
getNOMHandle(org.w3c.dom.Node node)
It returns a NOMHandle corresponding to the given DOM Node
|
static int |
getNOMNode(org.w3c.dom.Node node)
Deprecated.
in BOP4.3. instead use getNOMHandle(Node node)
|
static int |
unwrap(org.w3c.dom.Node node)
It Converts the DOM tree into a NOM tree.
|
public static void deleteNode(org.w3c.dom.Node node)
node
- @Deprecated public static int getNOMNode(org.w3c.dom.Node node)
IlleagalStateException
- when the NOM node corresponding to this DOM node is invalid(It is deleted already).LocalizableUnsupportedOperationException
- when the node is an Attr
.public static int unwrap(org.w3c.dom.Node node)
IlleagalStateException
- when the NOM node corresponding to this DOM node is invalid(It is deleted already)LocalizableUnsupportedOperationException
- when the node is an Attr
.public static NOMHandle getNOMHandle(org.w3c.dom.Node node)
node,
- the DOM node to which NOMHandle is to be created. This method should be used only in Try-With-Resource construct. Refer Documentation of
NOMHandle
for more information
Node domNode = constructDOMNode();//constructDOMNode() returns a DOM node from DOM-over-NOM implementation
try(NOMHandle handle = NOMUtil.getNOMHandle(domNode)){
oldAPIStillDemandingNOMNode(handle.getNOMNode());
}