Package org.jdom
Class Comment
- java.lang.Object
-
- org.jdom.Content
-
- org.jdom.Comment
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class Comment extends Content
An XML comment. Methods allow the user to get and set the text of the comment.- Version:
- $Revision: 1.33 $, $Date: 2007/11/10 05:28:58 $
- Author:
- Brett McLaughlin, Jason Hunter
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getText()
This returns the textual data within theComment
.java.lang.String
getValue()
Returns the XPath 1.0 string value of this element, which is the text of this comment.Comment
setText(java.lang.String text)
This will set the value of theComment
.java.lang.String
toString()
This returns aString
representation of theComment
, suitable for debugging.-
Methods inherited from class org.jdom.Content
clone, detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
-
-
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Returns the XPath 1.0 string value of this element, which is the text of this comment.
-
getText
public java.lang.String getText()
This returns the textual data within theComment
.- Returns:
String
- text of comment.
-
setText
public Comment setText(java.lang.String text)
This will set the value of theComment
.- Parameters:
text
-String
text for comment.- Returns:
Comment
- this Comment modified.- Throws:
IllegalDataException
- if the given text is illegal for a Comment.
-
toString
public java.lang.String toString()
This returns aString
representation of theComment
, suitable for debugging. If the XML representation of theComment
is desired,XMLOutputter.outputString(Comment)
should be used.- Overrides:
toString
in classjava.lang.Object
- Returns:
String
- information about theAttribute
-
-