Name
Node
Synopsis
public interface Node {
// Public Instance Methods
public abstract void detachNode( );
public abstract SOAPElement getParentElement( );
public abstract String getValue( );
public abstract void recycleNode( );
public abstract void setParentElement(SOAPElement parent)
throws SOAPException;
}Node is an interface that represents a node in a
DOM-like tree representation of a SOAP message. In particular,
Node owns the reference required to maintain the
linkage between a SOAP element and its single parent. In the SAAJ
API, Node is never used directly. Instead, the API
deals with its two derived interfaces:
SOAPElement, which adds the capability to attach
attributes and namespace declarations, and Text,
which represents textual content.
The getParentElement( ) method returns a reference
to the SOAPElement that resides above this
Node in the element hierarchy, whereas
setParentElement( ) links the node beneath a given
SOAPElement. The detachNode( )
method can be used to remove the Node from the
tree. If the application code knows that it no longer needs a
particular Node, it should use the
recycleNode( ) method to allow it to be
garbage-collected once all hard references to it are removed. As a
side effect, the Node is removed from its parent
if it is still linked when this method is called.
getValue( ) is a convenience method that returns a
string that is the value associated with a Text
child of this Node. It returns
null if the node does not have such a child. Text can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access