Class DomComment

All Implemented Interfaces:
Serializable, Cloneable, CharacterData, Comment, Node

public class DomComment extends DomCharacterData implements Comment
Wrapper for the DOM node Comment.
See Also:
  • Field Details

  • Constructor Details

    • DomComment

      public DomComment(SgmlPage page, String data)
      Creates an instance of DomComment.
      Parameters:
      page - the Page that contains this element
      data - the string data held by this node
  • Method Details

    • getNodeType

      public short getNodeType()
      Specified by:
      getNodeType in interface Node
      Returns:
      the node type constant, in this case Node.COMMENT_NODE
    • getNodeName

      public String getNodeName()
      Specified by:
      getNodeName in interface Node
      Returns:
      the node name, in this case NODE_NAME
    • printXml

      protected void printXml(String indent, PrintWriter printWriter)
      Recursively write the XML data for the node tree starting at node.
      Overrides:
      printXml in class DomNode
      Parameters:
      indent - white space to indent child nodes
      printWriter - writer where child nodes are written
    • toString

      public String toString()
      Returns a simple string representation to facilitate debugging.
      Overrides:
      toString in class Object
      Returns:
      a simple string representation
    • setPrefix

      public void setPrefix(String prefix)
      Specified by:
      setPrefix in interface Node