Package org.jsoup.nodes
Class Comment
- java.lang.Object
-
- org.jsoup.nodes.Node
-
- org.jsoup.nodes.Comment
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Comment extends Node
A comment node.- Author:
- Jonathan Hedley, jonathan@hedley.net
-
-
Constructor Summary
Constructors Constructor Description Comment(java.lang.String data, java.lang.String baseUri)
Create a new comment node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getData()
Get the contents of the comment.java.lang.String
nodeName()
Get the node name of this node.java.lang.String
toString()
-
Methods inherited from class org.jsoup.nodes.Node
absUrl, addChildren, addChildren, after, after, attr, attr, attributes, baseUri, before, before, childNode, childNodes, childNodesAsArray, childNodesCopy, childNodeSize, clone, doClone, ensureChildNodes, equals, hasAttr, hasSameValue, html, indent, nextSibling, outerHtml, outerHtml, ownerDocument, parent, parentNode, previousSibling, remove, removeAttr, removeChild, reparentChild, replaceChild, replaceWith, root, setBaseUri, setParentNode, setSiblingIndex, siblingIndex, siblingNodes, traverse, unwrap, wrap
-
-
-
-
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).
-
getData
public java.lang.String getData()
Get the contents of the comment.- Returns:
- comment content
-
-