Class DomComment

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.w3c.dom.CharacterData, org.w3c.dom.Comment, org.w3c.dom.Node

    public class DomComment
    extends DomCharacterData
    implements org.w3c.dom.Comment
    Wrapper for the DOM node Comment.
    See Also:
    Serialized Form
    • Field Detail

      • NODE_NAME

        public static final java.lang.String NODE_NAME
        The symbolic node name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DomComment

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

      • getNodeType

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

        public java.lang.String getNodeName()
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Returns:
        the node name, in this case NODE_NAME
      • printXml

        protected void printXml​(java.lang.String indent,
                                java.io.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 java.lang.String toString()
        Returns a simple string representation to facilitate debugging.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a simple string representation
      • setPrefix

        public void setPrefix​(java.lang.String prefix)
        Specified by:
        setPrefix in interface org.w3c.dom.Node