Class Comment

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Comment
    extends Node
    A comment node.
    Author:
    Jonathan Hedley, jonathan@hedley.net
    • Constructor Detail

      • Comment

        public Comment​(java.lang.String data,
                       java.lang.String baseUri)
        Create a new comment node.
        Parameters:
        data - The contents of the comment
        baseUri - base URI
    • Method Detail

      • nodeName

        public java.lang.String nodeName()
        Description copied from class: Node
        Get the node name of this node. Use for debugging purposes and not logic switching (for that, use instanceof).
        Specified by:
        nodeName in class Node
        Returns:
        node name
      • getData

        public java.lang.String getData()
        Get the contents of the comment.
        Returns:
        comment content
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Node