AI-generated Key Takeaways
-
Comment is a representation of an XML
Commentnode. -
Methods are available to detach the Comment node, get its parent element, and get or set its text value.
-
The
getValue()method retrieves the text value of all direct or indirect children of the node.
A representation of an XML Comment
node.
Methods
| Method | Return type | Brief description |
|---|---|---|
Content
|
Detaches the node from its parent Element
node. |
|
Element
|
Gets the node's parent Element
node. |
|
String
|
Gets the text value of the Comment
node. |
|
String
|
Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document. | |
Comment
|
Sets the text value of the Comment
node. |
Detailed documentation
detach()
get
Parent
Element()
get
Text()
Gets the text value of the Comment
node.
Return
String
— the text value of the Comment
node
get
Value()
Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.
Return
String
— the text value of all nodes that are direct or indirect children of the node
set
Text(text)
Sets the text value of the Comment
node.
Parameters
| Name | Type | Description |
|---|---|---|
text
|
String
|
the text value to set |
Return
Comment
— the Comment
node, for chaining

