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 |
Comment(java.lang.String data,
java.lang.String baseUri)
Create a new comment node. |
Method Summary |
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, clone, doClone, equals, hasAttr, hashCode, indent, nextSibling, outerHtml, outerHtml, ownerDocument, parent, previousSibling, remove, removeAttr, removeChild, replaceChild, replaceWith, setBaseUri, setParentNode, setSiblingIndex, siblingIndex, siblingNodes, unwrap, wrap |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Comment
public Comment(java.lang.String data,
java.lang.String baseUri)
- Create a new comment node.
- Parameters:
data
- The contents of the commentbaseUri
- base URI
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
Copyright © 2009-2011 Jonathan Hedley. All Rights Reserved.