Class Comment

java.lang.Object
com.oorian.xml.Comment
All Implemented Interfaces:
XmlNode

public class Comment extends Object implements XmlNode
Represents an XML comment node.
  • Constructor Details

    • Comment

      public Comment(String content)
      Constructs a new Comment with the specified content.
      Parameters:
      content - the comment content.
  • Method Details

    • setContent

      public void setContent(String content)
      Sets the comment content.
      Parameters:
      content - the new content.
    • getContent

      public String getContent()
      Returns the comment content.
      Returns:
      the content.
    • toXmlString

      public String toXmlString(int indent)
      Description copied from interface: XmlNode
      Returns the XML string representation of this node with the specified indentation level.
      Specified by:
      toXmlString in interface XmlNode
      Parameters:
      indent - the indentation level (number of two-space indents).
      Returns:
      the formatted XML string.
    • toString

      public String toString()
      Overrides:
      toString in class Object