oracle.xml.parser.v2
Class XMLNode

java.lang.Object
  |
  +--oracle.xml.parser.v2.XMLNode
Direct Known Subclasses:
AttrDecl, DTD, ElementDecl, XMLNotation, XMLNSNode

public abstract class XMLNode
extends java.lang.Object
implements Node, XMLConstants, EventTarget, java.lang.Cloneable, java.io.Externalizable, CXMLConstants

Implements the DOM Node interface and serves as the primary datatype for the entire Document Object Model. It represents a single node in the document tree.

The attributes nodeName, nodeValue and attributes are included as a mechanism to get at node information without casting down to the specific derived instance. In cases where there is no obvious mapping of these attributes for a specific nodeType (e.g., nodeValue for an Element or attributes for a Comment), this returns null. Note that the derived classes may contain additional and more convenient mechanisms to get and set the relevant information. This DOM Nodes extending XMLNode instead of XMLNSNode have fixed Nodename defined by DOM specification. Also only node that cannot have child nodes extend this class.

See Also:
Serialized Form

Field Summary
TypeField
static short ATTRDECL
          A attribute declaration node
static java.lang.String Auto_Events
           
static java.lang.String capturing
           
static java.lang.String DOMAttrModified
           
static java.lang.String DOMCharacterDataModified
           
static java.lang.String DOMNodeInserted
           
static java.lang.String DOMNodeInsertedIntoDocument
           
static java.lang.String DOMNodeRemoved
           
static java.lang.String DOMNodeRemovedFromDocument
           
static java.lang.String DOMSubtreeModified
           
static short ELEMENTDECL
          An element declaration node.
static java.lang.String noncapturing
           
static java.lang.String RANGE_DELETE_EVENT
           
static java.lang.String RANGE_DELETETEXT_EVENT
           
static java.lang.String RANGE_INSERT_EVENT
           
static java.lang.String RANGE_INSERTTEXT_EVENT
           
static java.lang.String RANGE_REPLACE_EVENT
           
static java.lang.String RANGE_SETTEXT_EVENT
           
static java.lang.String TRAVERSAL_DELETE_EVENT
           
static java.lang.String TRAVERSAL_REPLACE_EVENT
           
static short XMLDECL_NODE
          A attribute declaration node
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface oracle.xml.parser.v2.XMLConstants
AMP, ASTERISK, AUTO_VALIDATION, cANY, cATTLIST, cCDATA, cCDATAEND, cCDATASTART, cCOMMENTEND, cCOMMENTSTART, cDECCREF, cDECLSTART, cDOCTYPE, cELEMENT, cEMPTY, cEMPTYTAGEND, cENCODING, cENDTAGSTART, cENTITIES, cENTITY, cFIXED, cHEXCREF, cID, cIDREF, cIDREFS, cIGNORE, cIMPLIED, cINCLUDE, cNDATA, cNMTOKEN, cNMTOKENS, cNOTATION, COLON, COMMA, cPIEND, cPISTART, cPUBLIC, cREQUIRED, cSTANDALONE, cSYSTEM, cVERSION, cXML, DEFAULT_HASHSIZE_BIG, DEFAULT_HASHSIZE_SMALL, DEFAULT_PREFIX, DOUBLEQUOTE, DTD_VALIDATION, EOF, EQ, ERROR, EXT_GEN_ENTITY_FEATURE, EXT_PAR_ENTITY_FEATURE, FATAL_ERROR, FDIGIT, FLETTER, FMISCNAME, FSTARTNAME, FWHITESPACE, HASH, ICOUNT, ISTART, LEFTSQB, LPAREN, nameCDATA, nameCOMMENT, nameDOCUMENT, nameDOCUMENTFRAGMENT, nameENCODING, nameNameSpace, NAMESPACE_FEATURE, NAMESPACE_PREFIX_FEATURE, nameSpaceSeparator, nameSTANDALONE, nameTEXT, nameVERSION, nameXML, nameXMLLang, nameXMLNamespace, nameXMLNSNamespace, nameXMLSpace, nameXSLPI, NONVALIDATING, OR, PARTIAL_VALIDATION, PERCENT, PLUS, QMARK, QUOTE, RIGHTSQB, RPAREN, SCHEMA_LAX_VALIDATION, SCHEMA_STRICT_VALIDATION, SCHEMA_VALIDATION, SEMICOLON, SLASH, STRING_INTERN_FEATURE, TAGEND, TAGSTART, VALIDATION_FEATURE, WARNING
 
Fields inherited from interface oracle.xml.comp.CXMLConstants
ATTR_DEF, ATTR_TOKEN, ATTRDECL_DEF, CDATA_DEF, CHAR_DEF, COMMENT_DEF, CXML_VERSION, cXMLFILE, cXMLFILE_LEN, DEBUG, DTD_DEF, ELEMENTDECL_DEF, END, ENTITY_DEF, ENTITYREF_DEF, META_ID_MAX, names, NOTATION_DEF, NS_DEF, NULLSTR, PI_DEF, PREFIX_DEF, TAG_DEF, TAG_TOKEN, TOKEN_ONLY, XMLDECL_DEF
 
Constructor Summary
TypeConstructor
protected XMLNode()
          Constructs a new XMLNode having the given name and type
 
Method Summary
TypeMethod
 void addEventListener(java.lang.String type, EventListener listener, boolean useCapture)
          DOMEvents
 Node appendChild(Node newChild)
          Adds the node newChild to the end of the list of children of this node.
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 boolean dispatchEvent(Event evt)
          This method allows the dispatch of events into the implementations event model
 NamedNodeMap getAttributes()
          Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
 NodeList getChildNodes()
          Gets a NodeList that contains all children of this node.
 int getColumnNumber()
          Get column number debug information
 boolean getDebugMode()
          Get debug information mode
 Node getFirstChild()
          Gets the first child of this node.
 Node getLastChild()
          Gets the last child of this node.
 int getLineNumber()
          Get line number debug information
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 java.lang.String getNamespace()
           
 java.lang.String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 Node getNextSibling()
          Gets The node immediately following this node.
 java.lang.String getNodeLocalName()
           
 java.lang.String getNodeName()
          Gets the name of the node
 java.lang.String getNodePrefix()
           
 short getNodeType()
          Gets the type of the node
 java.lang.String getNodeValue()
          Gets the value of this node, depending on its type
 Document getOwnerDocument()
          Gets the Document object associated with this node.
 Node getParentNode()
          Gets the parent of this node.
 java.lang.String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 Node getPreviousSibling()
          Gets the node immediately preceding this node.
 java.lang.Object getProperty(java.lang.String propName)
          Get a property of the node
 java.lang.String getSystemId()
          Get the system id of the entity contain this node
 java.lang.String getText()
          Returns the non-marked-up text contained by this element.
 boolean hasAttributes()
          Returns whether this node (if it is an element) has any attributes.
 boolean hasChildNodes()
          This is a convenience method to allow easy determination of whether a node has any children.
 Node insertBefore(Node newChild, Node refChild)
          Inserts the node newChild before the existing child node refChild.
 boolean isNodeFlag(int flag)
           
 boolean isSupported(java.lang.String feature, java.lang.String version)
          Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
 void normalize()
          Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
 void print(java.io.OutputStream out)
          Writes the contents of this node to the given output stream.
 void print(java.io.OutputStream out, java.lang.String enc)
          Writes the contents of this node to the given output stream.
 void print(java.io.PrintWriter out)
          Writes the contents of this node using the given print writer.
 void readChildNodes(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext)
           
 void readExternal(java.io.ObjectInput inArg)
           
 void readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext)
           
 Node removeChild(Node oldChild)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 void removeEventListener(java.lang.String type, EventListener listener, boolean useCapture)
          This method allows the removal of event listeners from the event target.
 Node replaceChild(Node newChild, Node oldChild)
          Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 void reportSAXEvents(ContentHandler cntHandler)
          Report SAX Events from a DOM Tree
 void resetNodeFlag(int flag)
           
 NodeList selectNodes(java.lang.String pattern)
          Selects nodes from the tree which match the given pattern.
 NodeList selectNodes(java.lang.String pattern, NSResolver nsr)
          Selects nodes from the tree which match the given pattern
 NodeList selectNodes(XSLNodeSetInt expr)
           
 Node selectSingleNode(java.lang.String pattern)
          Selects the first node from the tree that matches the given pattern
 Node selectSingleNode(java.lang.String pattern, NSResolver nsr)
          Selects the first node from the tree that matches the given pattern
 void setDebugInfo(int line, int col, java.lang.String sysid)
          Set debug information in the node
 void setNodeFlag(int flag)
           
 void setNodeValue(java.lang.String nodeValue)
          Sets the value of this node, depending on its type
 void setPrefix(java.lang.String prefix)
           
 void setProperty(java.lang.String propName, java.lang.Object propValue)
          Set a property of the node
 boolean supports(java.lang.String feature, java.lang.String version)
          Deprecated. Use isSupported instead
 DocumentFragment transformNode(XSLStylesheet xsl)
          Transforms a node in the tree using the given stylesheet
 java.lang.String valueOf(java.lang.String pattern)
          Selects the value of the first node from tree that matches the pattern
 java.lang.String valueOf(java.lang.String pattern, NSResolver nsr)
          Selects the value of the first node from tree that matches the pattern
 void writeExternal(java.io.ObjectOutput out)
          DOM Serialization/Compression API's
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENTDECL

public static final short ELEMENTDECL
An element declaration node.

ATTRDECL

public static final short ATTRDECL
A attribute declaration node

XMLDECL_NODE

public static final short XMLDECL_NODE
A attribute declaration node

Auto_Events

public static final java.lang.String Auto_Events

RANGE_SETTEXT_EVENT

public static final java.lang.String RANGE_SETTEXT_EVENT

RANGE_INSERTTEXT_EVENT

public static final java.lang.String RANGE_INSERTTEXT_EVENT

RANGE_DELETETEXT_EVENT

public static final java.lang.String RANGE_DELETETEXT_EVENT

RANGE_INSERT_EVENT

public static final java.lang.String RANGE_INSERT_EVENT

RANGE_DELETE_EVENT

public static final java.lang.String RANGE_DELETE_EVENT

RANGE_REPLACE_EVENT

public static final java.lang.String RANGE_REPLACE_EVENT

TRAVERSAL_DELETE_EVENT

public static final java.lang.String TRAVERSAL_DELETE_EVENT

TRAVERSAL_REPLACE_EVENT

public static final java.lang.String TRAVERSAL_REPLACE_EVENT

DOMSubtreeModified

public static final java.lang.String DOMSubtreeModified

DOMNodeInserted

public static final java.lang.String DOMNodeInserted

DOMNodeRemoved

public static final java.lang.String DOMNodeRemoved

DOMNodeRemovedFromDocument

public static final java.lang.String DOMNodeRemovedFromDocument

DOMNodeInsertedIntoDocument

public static final java.lang.String DOMNodeInsertedIntoDocument

DOMAttrModified

public static final java.lang.String DOMAttrModified

DOMCharacterDataModified

public static final java.lang.String DOMCharacterDataModified

capturing

public static final java.lang.String capturing

noncapturing

public static final java.lang.String noncapturing
Constructor Detail

XMLNode

protected XMLNode()
Constructs a new XMLNode having the given name and type
Parameters:
tag - Name of the node
Method Detail

getNodeName

public java.lang.String getNodeName()
Gets the name of the node
Specified by:
getNodeName in interface Node
Returns:
name of the node

getNodeType

public short getNodeType()
Gets the type of the node
Specified by:
getNodeType in interface Node
Returns:
type of the node

getNodeValue

public java.lang.String getNodeValue()
                              throws DOMException
Gets the value of this node, depending on its type
Specified by:
getNodeValue in interface Node
Returns:
Value of this node
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

setNodeValue

public void setNodeValue(java.lang.String nodeValue)
                  throws DOMException
Sets the value of this node, depending on its type
Specified by:
setNodeValue in interface Node
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getParentNode

public Node getParentNode()
Gets the parent of this node. All nodes, except Document, DocumentFragment, and Attr may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.
Specified by:
getParentNode in interface Node
Returns:
The parent of this node

getChildNodes

public NodeList getChildNodes()
Gets a NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes. The content of the returned NodeList is "live" in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeList accessors; it is not a static snapshot of the content of the node. This is true for every NodeList, including the ones returned by the getElementsByTagName method.
Specified by:
getChildNodes in interface Node
Returns:
The children of this node

getFirstChild

public Node getFirstChild()
Gets the first child of this node. If there is no such node, this returns null.
Specified by:
getFirstChild in interface Node
Returns:
The first child of this node

getLastChild

public Node getLastChild()
Gets the last child of this node. If there is no such node, this returns null.
Specified by:
getLastChild in interface Node
Returns:
The last child of this node

getPreviousSibling

public Node getPreviousSibling()
Gets the node immediately preceding this node. If there is no such node, this returns null.
Specified by:
getPreviousSibling in interface Node
Returns:
the previous node

getNextSibling

public Node getNextSibling()
Gets The node immediately following this node. If there is no such node, this returns null.
Specified by:
getNextSibling in interface Node
Returns:
the next node

getAttributes

public NamedNodeMap getAttributes()
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
Specified by:
getAttributes in interface Node
Returns:
the attributes of this node

getOwnerDocument

public Document getOwnerDocument()
Gets the Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document this is null.
Specified by:
getOwnerDocument in interface Node
Returns:
The document associated with this node

hasChildNodes

public boolean hasChildNodes()
This is a convenience method to allow easy determination of whether a node has any children.
Specified by:
hasChildNodes in interface Node
Returns:
true if the node has any children, false if the node has no children.

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
                  throws DOMException
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.
Specified by:
insertBefore in interface Node
Parameters:
newChild - The node to insert.
refChild - The reference node, i.e., the node before which the new node must be inserted.
Returns:
The node being inserted.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
                  throws DOMException
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If the newChild is already in the tree, it is first removed.
Specified by:
replaceChild in interface Node
Parameters:
newChild - The new node to put in the child list.
oldChild - The node being replaced in the list.
Returns:
The node replaced.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or it the node to put in is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

removeChild

public Node removeChild(Node oldChild)
                 throws DOMException
Removes the child node indicated by oldChild from the list of children, and returns it.
Specified by:
removeChild in interface Node
Parameters:
oldChild - The node being removed.
Returns:
The node removed.
Throws:
DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

appendChild

public Node appendChild(Node newChild)
                 throws DOMException
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
Specified by:
appendChild in interface Node
Parameters:
newChild - The node to add.If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node
Returns:
The node added.
Throws:
DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

cloneNode

public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node.
Specified by:
cloneNode in interface Node
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.

transformNode

public DocumentFragment transformNode(XSLStylesheet xsl)
                               throws XSLException
Transforms a node in the tree using the given stylesheet
Parameters:
xsl - XSLStylesheet to be used for transformation
Returns:
a document fragment
Throws:
XSLException - Raised if there is an error while doing the XSL transformation.

selectNodes

public NodeList selectNodes(java.lang.String pattern,
                            NSResolver nsr)
                     throws XSLException
Selects nodes from the tree which match the given pattern
Parameters:
pattern - XSL pattern to match
nsr - NSResolver to resolve any namespace prefixes that occur in the given pattern
Returns:
a list of matching nodes
Throws:
XSLException - Raised if there is an error while doing the match

selectNodes

public NodeList selectNodes(XSLNodeSetInt expr)
                     throws XSLException

selectNodes

public NodeList selectNodes(java.lang.String pattern)
                     throws XSLException
Selects nodes from the tree which match the given pattern. This method assumes that the pattern does not contain namespace prefixes.
Parameters:
pattern - XSL pattern to match
Returns:
a list of matching nodes
Throws:
XSLException - Raised if there is an error while doing the match

selectSingleNode

public Node selectSingleNode(java.lang.String pattern,
                             NSResolver nsr)
                      throws XSLException
Selects the first node from the tree that matches the given pattern
Parameters:
pattern - XSL pattern to match
nsr - NSResolver to resolve any prefixes that occur in given pattern
Returns:
matching node
Throws:
XSLException - Raised if there is an error while doing the match

selectSingleNode

public Node selectSingleNode(java.lang.String pattern)
                      throws XSLException
Selects the first node from the tree that matches the given pattern
Parameters:
pattern - XSL pattern to match
Returns:
matching node
Throws:
XSLException - Raised if there is an error while doing the match

valueOf

public java.lang.String valueOf(java.lang.String pattern,
                                NSResolver nsr)
                         throws XSLException
Selects the value of the first node from tree that matches the pattern
Parameters:
pattern - XSL pattern to match
nsr - NSResolver to resolve any prefixes that occur in given pattern
Returns:
value of the matching node
Throws:
XSLException - Raised if there is an error while doing the match

valueOf

public java.lang.String valueOf(java.lang.String pattern)
                         throws XSLException
Selects the value of the first node from tree that matches the pattern
Parameters:
pattern - XSL pattern to match
Returns:
value of the matching node
Throws:
XSLException - Raised if there is an error while doing the match

getDebugMode

public boolean getDebugMode()
Get debug information mode
Returns:
flag debugging mode

setDebugInfo

public void setDebugInfo(int line,
                         int col,
                         java.lang.String sysid)
Set debug information in the node
Parameters:
line - the line number
col - the col number
sysid - the system id

getLineNumber

public int getLineNumber()
Get line number debug information
Returns:
line the line number

getColumnNumber

public int getColumnNumber()
Get column number debug information
Returns:
column the column number

getSystemId

public java.lang.String getSystemId()
Get the system id of the entity contain this node
Returns:
sysid the system id

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.Object propValue)
Set a property of the node
Parameters:
propName - - Name of the property
propValue - - Value of the property

getProperty

public java.lang.Object getProperty(java.lang.String propName)
Get a property of the node
Parameters:
propName - - Name of the property
Returns:
Object propValue - Value of the property

print

public void print(java.io.PrintWriter out)
           throws java.io.IOException
Writes the contents of this node using the given print writer.
Parameters:
out - PrintWriter to use
Throws:
java.io.IOException - if an error occurs

print

public void print(java.io.OutputStream out)
           throws java.io.IOException
Writes the contents of this node to the given output stream.
Parameters:
out - OutputStream to write to
Throws:
java.io.IOException - if an error occurs

print

public void print(java.io.OutputStream out,
                  java.lang.String enc)
           throws java.io.IOException
Writes the contents of this node to the given output stream.
Parameters:
out - OutputStream to write to
enc - Encoding to use for the output
Throws:
java.io.IOException - if an invalid encoding was specified or if any other error occurs

reportSAXEvents

public void reportSAXEvents(ContentHandler cntHandler)
                     throws SAXException
Report SAX Events from a DOM Tree
Parameters:
ContentHandler - cntHandler
Throws:
SAXException - thrown by SAX Callback functions

getText

public java.lang.String getText()
Returns the non-marked-up text contained by this element. For text elements, this is the raw data. For elements with child nodes, this method traverses the entire subtree and appends the text for each terminal text element, effectively stripping out the XML markup for the subtree. For example, if the XML document contains the following: <AUTHOR> <FIRST>William</FIRST> <LAST>Shakespeare</LAST> </AUTHOR>

XMLDocument.getText returns "William Shakespeare".

Returns:
non-marked-up text contained bu this element

normalize

public void normalize()
Description copied from interface: Node
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate between Text nodes and CDATASection nodes.
Specified by:
normalize in interface Node
Since:
DOM 2 Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes,i.e., there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particulardocument tree structure are to be used.

supports

public boolean supports(java.lang.String feature,
                        java.lang.String version)
Deprecated. Use isSupported instead

Parameters:
String - feature ,String version
Returns:
true,if the feature is supported else false
Since:
DOM 2 Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

isSupported

public boolean isSupported(java.lang.String feature,
                           java.lang.String version)
Description copied from interface: Node
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
Specified by:
isSupported in interface Node
Parameters:
String - feature ,String version
Returns:
true,if the feature is supported else false
Since:
DOM 2 Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

getNamespace

public java.lang.String getNamespace()
Since:
DOM 2 gets the namespace URI of this node. overrided by node types for which namespace is meaningful.

getNamespaceURI

public java.lang.String getNamespaceURI()
Description copied from interface: Node
The namespace URI of this node, or null if it is unspecified.
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.
Specified by:
getNamespaceURI in interface Node

getNodePrefix

public java.lang.String getNodePrefix()
Since:
DOM 2 gets the prefix of this node overrided by node types for which namespace is meaningful.

getPrefix

public java.lang.String getPrefix()
Description copied from interface: Node
The namespace prefix of this node, or null if it is unspecified.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Specified by:
getPrefix in interface Node
Tags copied from interface: Node
Throws:
DOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from " http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" .

setPrefix

public void setPrefix(java.lang.String prefix)
               throws DOMException
Specified by:
setPrefix in interface Node
Since:
DOM 2 sets the prefix of this node overrided by node types for which namespace is meaningful.

getNodeLocalName

public java.lang.String getNodeLocalName()
Since:
DOM 2 gets the Local Name of this node overrided by node types for which namespace is meaningful.

getLocalName

public java.lang.String getLocalName()
Description copied from interface: Node
Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Specified by:
getLocalName in interface Node

hasAttributes

public boolean hasAttributes()
Returns whether this node (if it is an element) has any attributes.
Specified by:
hasAttributes in interface Node
Returns:
true if this node has any attributes, false otherwise.
Since:
DOM Level 2

addEventListener

public void addEventListener(java.lang.String type,
                             EventListener listener,
                             boolean useCapture)
DOMEvents
Specified by:
addEventListener in interface EventTarget
Tags copied from interface: EventTarget
Parameters:
typeThe - event type for which the user is registering
listenerThe - listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
useCaptureIf - true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.

removeEventListener

public void removeEventListener(java.lang.String type,
                                EventListener listener,
                                boolean useCapture)
Description copied from interface: EventTarget
This method allows the removal of event listeners from the event target. If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed.
Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.
Specified by:
removeEventListener in interface EventTarget
Tags copied from interface: EventTarget
Parameters:
typeSpecifies - the event type of the EventListener being removed.
listenerThe - EventListener parameter indicates the EventListener to be removed.
useCaptureSpecifies - whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.

dispatchEvent

public boolean dispatchEvent(Event evt)
                      throws DOMException
This method allows the dispatch of events into the implementations event model
Specified by:
dispatchEvent in interface EventTarget
Returns:
boolean value that indicates whether preventDefault or stopPropogation was called

isNodeFlag

public boolean isNodeFlag(int flag)

setNodeFlag

public void setNodeFlag(int flag)

resetNodeFlag

public void resetNodeFlag(int flag)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
DOM Serialization/Compression API's
Specified by:
writeExternal in interface java.io.Externalizable

readExternal

public void readExternal(java.io.ObjectInput inArg)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable

readExternal

public void readExternal(oracle.xml.io.XMLObjectInput in,
                         oracle.xml.comp.CXMLContext cxmlContext)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException

readChildNodes

public void readChildNodes(oracle.xml.io.XMLObjectInput in,
                           oracle.xml.comp.CXMLContext cxmlContext)
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException