Class Comment
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
詳細なドキュメント
detach()
ノードを親の Element
ノードから切断します。ノードに親がない場合、このメソッドは効果がありません。
戻る
Content
- デタッチされたノード
getParentElement()
ノードの親 Element
ノードを取得します。ノードに親がない場合、このメソッドは null
を返します。
戻る
Element
- 親 Element
ノード
getText()
Comment
ノードのテキスト値を取得します。
戻る
String
- Comment
ノードのテキスト値
getValue()
ノードの直接の子または間接の子であるすべてのノードのテキスト値を、ドキュメントに表示される順序で取得します。
戻る
String
- ノードの直接または間接の子であるすべてのノードのテキスト値
setText(text)
Comment
ノードのテキスト値を設定します。
パラメータ
名前 | 型 | 説明 |
text | String | 設定するテキスト値 |
戻る
Comment
- チェーン用の Comment
ノード
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],["An XML `Comment` node can be manipulated using several methods. `detach()` removes the node from its parent element. `getParentElement()` retrieves the parent `Element` node, if any. `getText()` and `getValue()` return the text content of the `Comment` node and its children respectively. The `setText(text)` method updates the text content of the `Comment` node and supports method chaining by returning the updated `Comment` node.\n"],null,[]]