Class Comment
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
মন্তব্য করুন একটি XML Comment
নোডের একটি উপস্থাপনা।
বিস্তারিত ডকুমেন্টেশন
detach()
নোডটিকে এর মূল Element
নোড থেকে বিচ্ছিন্ন করে। যদি নোডের একটি অভিভাবক না থাকে, এই পদ্ধতির কোন প্রভাব নেই।
প্রত্যাবর্তন
Content
- বিচ্ছিন্ন নোড
get Parent Element()
নোডের প্যারেন্ট Element
নোড পায়। যদি নোডের একটি অভিভাবক না থাকে, এই পদ্ধতিটি null
প্রদান করে।
প্রত্যাবর্তন
Element
- প্যারেন্ট Element
নোড
get Text()
Comment
নোডের পাঠ্য মান পায়।
প্রত্যাবর্তন
String
- Comment
নোডের পাঠ্য মান
get Value()
নোডের প্রত্যক্ষ বা পরোক্ষ সন্তান যে সমস্ত নোডের পাঠ্য মান পায়, সেগুলি নথিতে প্রদর্শিত ক্রমে।
প্রত্যাবর্তন
String
— নোডের প্রত্যক্ষ বা পরোক্ষ সন্তান যে সমস্ত নোডের পাঠ্য মান
set Text(text)
Comment
নোডের পাঠ্য মান সেট করে।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
text | String | টেক্সট মান সেট করতে হবে |
প্রত্যাবর্তন
Comment
- চেইন করার জন্য Comment
নোড
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eRepresents an XML \u003ccode\u003eComment\u003c/code\u003e node, providing methods for interaction.\u003c/p\u003e\n"],["\u003cp\u003eAllows detachment from parent element, retrieval of parent/text values, and text modification.\u003c/p\u003e\n"],["\u003cp\u003eIncludes \u003ccode\u003egetText()\u003c/code\u003e for the comment's text and \u003ccode\u003egetValue()\u003c/code\u003e for text of all child nodes.\u003c/p\u003e\n"],["\u003cp\u003eOffers \u003ccode\u003esetText()\u003c/code\u003e to modify the comment's text and \u003ccode\u003edetach()\u003c/code\u003e to remove it from its parent.\u003c/p\u003e\n"]]],["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,["# Class Comment\n\nComment\n\nA representation of an XML `Comment` node. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| [detach()](#detach()) | [Content](/apps-script/reference/xml-service/content) | Detaches the node from its parent [Element](/apps-script/reference/xml-service/element) node. |\n| [getParentElement()](#getParentElement()) | [Element](/apps-script/reference/xml-service/element) | Gets the node's parent [Element](/apps-script/reference/xml-service/element) node. |\n| [getText()](#getText()) | `String` | Gets the text value of the `Comment` node. |\n| [getValue()](#getValue()) | `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. |\n| [setText(text)](#setText(String)) | [Comment](#) | Sets the text value of the `Comment` node. |\n\nDetailed documentation\n----------------------\n\n### `detach()`\n\nDetaches the node from its parent [Element](/apps-script/reference/xml-service/element) node. If the node does not have a parent,\nthis method has no effect.\n\n#### Return\n\n\n[Content](/apps-script/reference/xml-service/content) --- the detached node\n\n*** ** * ** ***\n\n### `get``Parent``Element()`\n\nGets the node's parent [Element](/apps-script/reference/xml-service/element) node. If the node does not have a parent, this method\nreturns `null`.\n\n#### Return\n\n\n[Element](/apps-script/reference/xml-service/element) --- the parent `Element` node\n\n*** ** * ** ***\n\n### `get``Text()`\n\nGets the text value of the `Comment` node.\n\n#### Return\n\n\n`String` --- the text value of the `Comment` node\n\n*** ** * ** ***\n\n### `get``Value()`\n\nGets the text value of all nodes that are direct or indirect children of the node, in the order\nthey appear in the document.\n\n#### Return\n\n\n`String` --- the text value of all nodes that are direct or indirect children of the node\n\n*** ** * ** ***\n\n### `set``Text(text)`\n\nSets the text value of the `Comment` node.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|----------|-----------------------|\n| `text` | `String` | the text value to set |\n\n#### Return\n\n\n[Comment](#) --- the `Comment` node, for chaining"]]