Class Text
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
詳細なドキュメント
append(text)
指定されたテキストをノードにすでに存在するコンテンツに追加します。
パラメータ
| 名前 | 型 | 説明 |
text | String | ノードに追加するテキスト。 |
戻る
Text - チェーン用の Text ノード。
detach()
ノードを親の Element ノードから切り離します。ノードに親がない場合、このメソッドは効力がありません。
戻る
Content|null - デタッチされたノード。
getParentElement()
ノードの親 Element ノードを取得します。ノードに親がない場合、このメソッドは null を返します。
戻る
Element|null - 親 Element ノード。
getText()
Text ノードのテキスト値を取得します。
戻る
String - Text ノードのテキスト値。
getValue()
ノードの直接または間接の子であるすべてのノードのテキスト値を、ドキュメントに表示される順序で取得します。
戻る
String - ノードの直接または間接の子であるすべてのノードのテキスト値。
setText(text)
Text ノードのテキスト値を設定します。
パラメータ
| 名前 | 型 | 説明 |
text | String | 設定するテキスト値。 |
戻る
Text - チェーン用の Text ノード。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2026-02-11 UTC。
[null,null,["最終更新日 2026-02-11 UTC。"],[],["The `Text` node represents XML text content. Key actions include: appending text to the node via `append(text)`, detaching the node from its parent using `detach()`, and retrieving the parent element with `getParentElement()`. Text content can be obtained using `getText()` for the node's text or `getValue()` for text of child nodes. Finally, `setText(text)` sets the text value of the node. These methods allow manipulation and reading of text in an XML structure.\n"]]