org.apache.xerces.dom
Class CommentImpl

java.lang.Object
  |
  +--org.apache.xerces.dom.NodeImpl
        |
        +--org.apache.xerces.dom.CharacterDataImpl
              |
              +--org.apache.xerces.dom.CommentImpl
Direct Known Subclasses:
DeferredCommentImpl

public class CommentImpl
extends CharacterDataImpl
implements Comment

Represents an XML (or HTML) comment.

Since:
PR-DOM-Level-1-19980818.
Version:
 
See Also:
Serialized Form

Fields inherited from class org.apache.xerces.dom.NodeImpl
ELEMENT_DEFINITION_NODE, fInternalSetNodeValue, MUTATION_AGGREGATE, MUTATION_ALL, MUTATION_LOCAL, MUTATION_NONE, MUTATIONEVENTS, name, nextSibling, ownerDocument, parentNode, previousSibling, readOnly, syncData, userData, value
 
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
 
Constructor Summary
CommentImpl(DocumentImpl ownerDoc, java.lang.String data)
          Factory constructor.
 
Method Summary
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 java.lang.String getNodeName()
          Returns the node name.
 short getNodeType()
          A short integer indicating what type of node this is.
 
Methods inherited from class org.apache.xerces.dom.CharacterDataImpl
appendData, deleteData, getChildNodes, getData, getLength, insertData, replaceData, setData, substringData
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, dispatchEvent, finalize, getAttributes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getUserData, hasChildNodes, insertBefore, item, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, setPrefix, setReadOnly, setUserData, supports, synchronizeData, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommentImpl

public CommentImpl(DocumentImpl ownerDoc,
                   java.lang.String data)
Factory constructor.
Method Detail

getNodeType

public short getNodeType()
A short integer indicating what type of node this is. The named constants for this value are defined in the org.w3c.dom.Node interface.
Overrides:
getNodeType in class NodeImpl

getNodeName

public java.lang.String getNodeName()
Returns the node name.
Overrides:
getNodeName in class CharacterDataImpl

cloneNode

public Node cloneNode(boolean deep)
Description copied from interface: Node
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.
Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly.
Overrides:
cloneNode in class NodeImpl
Tags copied from 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.


Copyright © 1999 Apache XML Project. All Rights Reserved.