public class Comment extends Node
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
COMMENT_KEY |
attributes, baseUri, childNodes, parentNode, siblingIndex
Constructor and Description |
---|
Comment(java.lang.String data,
java.lang.String baseUri)
Create a new comment node.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getData()
Get the contents of the comment.
|
java.lang.String |
nodeName()
Get the node name of this node.
|
(package private) void |
outerHtmlHead(java.lang.Appendable accum,
int depth,
Document.OutputSettings out)
Get the outer HTML of this node.
|
(package private) void |
outerHtmlTail(java.lang.Appendable accum,
int depth,
Document.OutputSettings out) |
java.lang.String |
toString() |
absUrl, addChildren, addChildren, after, after, attr, attr, attributes, baseUri, before, before, childNode, childNodes, childNodesAsArray, childNodesCopy, childNodeSize, clearAttributes, clone, doClone, ensureChildNodes, equals, getOutputSettings, hasAttr, hasSameValue, html, indent, nextSibling, nodelistChanged, outerHtml, outerHtml, ownerDocument, parent, parentNode, previousSibling, remove, removeAttr, removeChild, reparentChild, replaceChild, replaceWith, root, setBaseUri, setParentNode, setSiblingIndex, siblingIndex, siblingNodes, traverse, unwrap, wrap
private static final java.lang.String COMMENT_KEY
public Comment(java.lang.String data, java.lang.String baseUri)
data
- The contents of the commentbaseUri
- base URIpublic java.lang.String nodeName()
Node
public java.lang.String getData()
void outerHtmlHead(java.lang.Appendable accum, int depth, Document.OutputSettings out) throws java.io.IOException
Node
outerHtmlHead
in class Node
accum
- accumulator to place HTML intojava.io.IOException
- if appending to the given accumulator fails.void outerHtmlTail(java.lang.Appendable accum, int depth, Document.OutputSettings out)
outerHtmlTail
in class Node