Warning: This is a facade provided for use by user code, not for implementation by user code. User implementations of this interface are highly likely to be incompatible with future releases of the product at both binary and source levels.
; {comment text}@author stefano.bertini[at]gmail.com
See also the Document Object Model (DOM) Level 3 Core Specification.
This class represents an XML comment such as <-- This is a comment-->
. A comment node cannot have any child nodes. It can be a child of an Element
or a Document
. It has essentially no internal substructure.
Comment
defines the behavior of an XML comment.
Comment: LineComment BlockComment Javadoc@since 3.0
The first three should be familiar to Java programmers. JsDoc comments are really just block comments with some conventions about the formatting within the comment delimiters. Line and block comments are described in the Ecma-262 specification.
SpiderMonkey and Rhino also support HTML comment syntax, but somewhat counterintuitively, the syntax does not produce a block comment. Instead, everything from the string <!-- through the end of the line is considered a comment, and if the token --> is the first non-whitespace on the line, then the line is considered a line comment. This is to support parsing JavaScript in <script> HTML tags that has been "hidden" from very old browsers by surrounding it with HTML comment delimiters.
Note the node start position for Comment nodes is still relative to the parent, but Comments are always stored directly in the AstRoot node, so they are also effectively absolute offsets.
A Comment node in a Thymeleaf DOM tree.
@author Daniel Fernández @since 2.0.0CharacterData
and represents the content of a comment, i.e., all the characters between the starting ' <!--
' and ending '-->
'. Note that this is the definition of a comment in XML, and, in practice, HTML, although some HTML tools may implement the full SGML comment structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|