The kind of XML node this object represents.
The parent of this object in the XML tree, or null if it is a root.
ReadonlyvalueThe text content of the comment (without the <!-- / --> delimiters).
Gets the next sibling node, or null if this is the last node.
Gets the previous sibling node, or null if this is the first node.
Inserts the specified content immediately after this node in its parent.
One or more nodes or strings to insert.
Performs a deep structural comparison of this node with another.
The node to compare against.
true if the two nodes are structurally identical.
Compares this comment to another by value.
The comment to compare against.
true if the values are equal.
Removes annotations from this object.
Returns the XML serialization of this comment, e.g. <!-- text -->.
The serialized comment string.
StaticdeepStatic convenience method for deep structural comparison of two nodes.
true if the two nodes are structurally identical.
Represents an XML comment node (
<!-- ... -->).Remarks
Throws if the content contains
"--", which is invalid inside an XML comment.Example