gnu.xml.dom

Class DomComment

Implemented Interfaces:
CharacterData, Cloneable, Comment, Comparable, DocumentEvent, EventTarget, Node, NodeList

public class DomComment
extends DomCharacterData
implements Comment

"Comment" implementation. Comments hold data intended for direct consumption by people; programs should only use ProcessingInstruction nodes. Note that since SAX makes comment reporting optional, XML systems that rely on comments (such as by using this class) will often lose those comments at some point in the processing pipeline.

Fields inherited from interface org.w3c.dom.Node

ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

Constructor Summary

DomComment(DomDocument owner, String value)
Constructs a comment node associated with the specified document and holding the specified data.

Method Summary

String
getNodeName()
DOM L1 Returns the string "#comment".

Methods inherited from class gnu.xml.dom.DomCharacterData

appendData, deleteData, getBaseURI, getData, getLength, getNodeValue, insertData, replaceData, setData, setNodeValue, substringData

Methods inherited from class gnu.xml.dom.DomNode

addEventListener, appendChild, clone, cloneNode, compact, compareDocumentPosition, compareTo, createEvent, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isReadonly, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, makeReadonly, nameAndTypeEquals, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, toString, trimToSize

Constructor Details

DomComment

protected DomComment(DomDocument owner,
                     String value)
Constructs a comment node associated with the specified document and holding the specified data.

This constructor should only be invoked by a Document as part of its createComment functionality, or through a subclass which is similarly used in a "Sub-DOM" style layer.

Method Details

getNodeName

public final String getNodeName()
DOM L1 Returns the string "#comment".
Specified by:
getNodeName in interface Node
Overrides:
getNodeName in interface DomNode