Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
gnu.xml.dom

Class DomComment

java.lang.Object
|
+--gnu.xml.dom.DomNode
   |
   +--gnu.xml.dom.DomCharacterData
      |
      +--gnu.xml.dom.DomComment

All Implemented Interfaces:

Comment, CharacterData, Node, NodeList, EventTarget, DocumentEvent, Cloneable


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.

Author:

Constructor Summary

DomComment(org.w3c.dom.Document owner, java.lang.String value)

Constructs a comment node associated with the specified document and holding the specified data.

Method Summary

java.lang.StringgetNodeName()

DOM L1 Returns the string "#comment".
shortgetNodeType()

DOM L1 Returns the constant COMMENT_NODE.

Constructor Details

DomComment

protected DomComment(org.w3c.dom.Document owner, java.lang.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.

Parameters:


Method Details

getNodeName

public final String getNodeName()

DOM L1 Returns the string "#comment".


getNodeType

public final short getNodeType()

DOM L1 Returns the constant COMMENT_NODE.