[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eContent\u003c/code\u003e is a generic representation of an XML node in Google Apps Script and provides methods to interact with it.\u003c/p\u003e\n"],["\u003cp\u003eIt offers various methods to cast the node into specific types like \u003ccode\u003eElement\u003c/code\u003e, \u003ccode\u003eText\u003c/code\u003e, \u003ccode\u003eComment\u003c/code\u003e, etc., for easier manipulation.\u003c/p\u003e\n"],["\u003cp\u003eYou can detach a node from its parent, get its parent element, or retrieve its content type using dedicated methods.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetValue()\u003c/code\u003e helps retrieve the combined text value of all the node's children, providing a way to access its content.\u003c/p\u003e\n"],["\u003cp\u003eImplementing classes include \u003ccode\u003eCdata\u003c/code\u003e, \u003ccode\u003eComment\u003c/code\u003e, \u003ccode\u003eDocType\u003c/code\u003e, \u003ccode\u003eElement\u003c/code\u003e, \u003ccode\u003eEntityRef\u003c/code\u003e, \u003ccode\u003eProcessingInstruction\u003c/code\u003e, and \u003ccode\u003eText\u003c/code\u003e, representing different XML node types.\u003c/p\u003e\n"]]],["This content details a generic XML node and its interactions. It outlines seven specific XML node types: Cdata, Comment, DocType, Element, EntityRef, ProcessingInstruction, and Text. Key actions include casting a node to a specific type using `asType()` methods, which return `null` if the type is incorrect. Other actions involve `detach()` to remove a node from its parent, `getParentElement()` to find the parent, `getType()` to retrieve the content type, and `getValue()` to get the combined text value of child nodes.\n"],null,["Content\n\nA representation of a generic XML node.\n\nImplementing classes \n\n| Name | Brief description |\n|------------------------------------------------------------------------------------|------------------------------------------------------------|\n| [Cdata](/apps-script/reference/xml-service/cdata) | A representation of an XML `CDATASection` node. |\n| [Comment](/apps-script/reference/xml-service/comment) | A representation of an XML `Comment` node. |\n| [DocType](/apps-script/reference/xml-service/doc-type) | A representation of an XML `Document``Type` node. |\n| [Element](/apps-script/reference/xml-service/element) | A representation of an XML `Element` node. |\n| [EntityRef](/apps-script/reference/xml-service/entity-ref) | A representation of an XML `Entity``Reference` node. |\n| [ProcessingInstruction](/apps-script/reference/xml-service/processing-instruction) | A representation of an XML `Processing``Instruction` node. |\n| [Text](/apps-script/reference/xml-service/text) | A representation of an XML `Text` node. |\n\nMethods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| [asCdata()](#asCdata()) | [Cdata](/apps-script/reference/xml-service/cdata) | Casts the node as a [CDATASection](/apps-script/reference/xml-service/cdata) node for the purposes of autocomplete. |\n| [asComment()](#asComment()) | [Comment](/apps-script/reference/xml-service/comment) | Casts the node as a [Comment](/apps-script/reference/xml-service/comment) node for the purposes of autocomplete. |\n| [asDocType()](#asDocType()) | [DocType](/apps-script/reference/xml-service/doc-type) | Casts the node as a [DocumentType](/apps-script/reference/xml-service/doc-type) node for the purposes of autocomplete. |\n| [asElement()](#asElement()) | [Element](/apps-script/reference/xml-service/element) | Casts the node as an [Element](/apps-script/reference/xml-service/element) node for the purposes of autocomplete. |\n| [asEntityRef()](#asEntityRef()) | [EntityRef](/apps-script/reference/xml-service/entity-ref) | Casts the node as a [EntityReference](/apps-script/reference/xml-service/entity-ref) node for the purposes of autocomplete. |\n| [asProcessingInstruction()](#asProcessingInstruction()) | [ProcessingInstruction](/apps-script/reference/xml-service/processing-instruction) | Casts the node as a [ProcessingInstruction](/apps-script/reference/xml-service/processing-instruction) node for the purposes of autocomplete. |\n| [asText()](#asText()) | [Text](/apps-script/reference/xml-service/text) | Casts the node as a [Text](/apps-script/reference/xml-service/text) node for the purposes of autocomplete. |\n| [detach()](#detach()) | [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| [getType()](#getType()) | [ContentType](/apps-script/reference/xml-service/content-type) | Gets the node's content type. |\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\nDetailed documentation \n\n`as``Cdata()` \nCasts the node as a [CDATASection](/apps-script/reference/xml-service/cdata) node for the purposes of autocomplete. If the\nnode's [ContentType](/apps-script/reference/xml-service/content-type) is not already `CDATA`, this method returns `null`.\n\nReturn\n\n\n[Cdata](/apps-script/reference/xml-service/cdata) --- the `CDATASection` node\n\n*** ** * ** ***\n\n`as``Comment()` \nCasts the node as a [Comment](/apps-script/reference/xml-service/comment) node for the purposes of autocomplete. If the node's\n[ContentType](/apps-script/reference/xml-service/content-type) is not already `COMMENT`, this method returns `null`.\n\nReturn\n\n\n[Comment](/apps-script/reference/xml-service/comment) --- the `Comment` node, or `null` if the node's content type is not [COMMENT](/apps-script/reference/xml-service/content-type)\n\n*** ** * ** ***\n\n`as``Doc``Type()` \nCasts the node as a [DocumentType](/apps-script/reference/xml-service/doc-type) node for the purposes of autocomplete. If\nthe node's [ContentType](/apps-script/reference/xml-service/content-type) is not already `DOCTYPE`, this method returns `null`.\n\nReturn\n\n\n[DocType](/apps-script/reference/xml-service/doc-type) --- the `Document``Type` node\n\n*** ** * ** ***\n\n`as``Element()` \nCasts the node as an [Element](/apps-script/reference/xml-service/element) node for the purposes of autocomplete. If the node's\n[ContentType](/apps-script/reference/xml-service/content-type) is not already `ELEMENT`, this method returns `null`.\n\nReturn\n\n\n[Element](/apps-script/reference/xml-service/element) --- the `Element` node\n\n*** ** * ** ***\n\n`as``Entity``Ref()` \nCasts the node as a [EntityReference](/apps-script/reference/xml-service/entity-ref) node for the purposes of autocomplete.\nIf the node's [ContentType](/apps-script/reference/xml-service/content-type) is not already `ENTITYREF`, this method returns\n`null`.\n\nReturn\n\n\n[EntityRef](/apps-script/reference/xml-service/entity-ref) --- the `Entity``Reference` node\n\n*** ** * ** ***\n\n`as``Processing``Instruction()` \nCasts the node as a [ProcessingInstruction](/apps-script/reference/xml-service/processing-instruction) node for the purposes of autocomplete. If\nthe node's [ContentType](/apps-script/reference/xml-service/content-type) is not already `PROCESSINGINSTRUCTION`, this method\nreturns `null`.\n\nReturn\n\n\n[ProcessingInstruction](/apps-script/reference/xml-service/processing-instruction) --- the `Processing``Instruction` node\n\n*** ** * ** ***\n\n`as``Text()` \nCasts the node as a [Text](/apps-script/reference/xml-service/text) node for the purposes of autocomplete. If the node's [ContentType](/apps-script/reference/xml-service/content-type) is not already `TEXT`, this method returns `null`.\n\nReturn\n\n\n[Text](/apps-script/reference/xml-service/text) --- the `Text` node\n\n*** ** * ** ***\n\n`detach()` \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\nReturn\n\n\n[Content](#) --- the detached node\n\n*** ** * ** ***\n\n`get``Parent``Element()` \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\nReturn\n\n\n[Element](/apps-script/reference/xml-service/element) --- the parent `Element` node\n\n*** ** * ** ***\n\n`get``Type()` \nGets the node's content type.\n\nReturn\n\n\n[ContentType](/apps-script/reference/xml-service/content-type) --- the node's content type\n\n*** ** * ** ***\n\n`get``Value()` \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\nReturn\n\n\n`String` --- the text value of all nodes that are direct or indirect children of the node"]]