Ruft den Textwert aller Knoten ab, die direkte oder indirekte untergeordnete Elemente des Knotens sind, in der Reihenfolge, in der sie im Dokument erscheinen.
Legt die System-ID des EntityReference-Knotens fest.
Detaillierte Dokumentation
detach()
Der Knoten wird von seinem übergeordneten Knoten Element getrennt. Wenn der Knoten kein übergeordnetes Element hat, hat diese Methode keine Auswirkungen.
Ruft die öffentliche ID des EntityReference-Knotens ab. Wenn der Knoten keine öffentliche ID hat, gibt diese Methode null zurück.
Rückflug
String: Die öffentliche ID des EntityReference-Knotens oder null, falls keine vorhanden ist.
getSystemId()
Ruft die System-ID des EntityReference-Knotens ab. Wenn der Knoten keine System-ID hat, gibt diese Methode null zurück.
Rückflug
String: die System-ID des EntityReference-Knotens oder null, wenn keine vorhanden ist
getValue()
Ruft den Textwert aller Knoten ab, die direkte oder indirekte untergeordnete Elemente des Knotens sind, in der Reihenfolge, in der sie im Dokument erscheinen.
Rückflug
String: Der Textwert aller Knoten, die direkte oder indirekte untergeordnete Knoten des Knotens sind.
setName(name)
Legt den Namen des EntityReference-Knotens fest.
Parameter
Name
Typ
Beschreibung
name
String
den Namen, der festgelegt werden soll
Rückflug
EntityRef – der EntityReference-Knoten für die Verkettung
setPublicId(id)
Legt die öffentliche ID des EntityReference-Knotens fest.
Parameter
Name
Typ
Beschreibung
id
String
die öffentliche ID, die festgelegt werden soll
Rückflug
EntityRef – der EntityReference-Knoten für die Verkettung
setSystemId(id)
Legt die System-ID des EntityReference-Knotens fest.
Parameter
Name
Typ
Beschreibung
id
String
die System-ID, die festgelegt werden soll
Rückflug
EntityRef – der EntityReference-Knoten für die Verkettung
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eEntityRef\u003c/code\u003e represents an XML \u003ccode\u003eEntityReference\u003c/code\u003e node, providing methods to interact with and modify it within a document.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to get and set the name, public ID, and system ID of the entity reference.\u003c/p\u003e\n"],["\u003cp\u003eYou can detach the node from its parent, retrieve its text value, and access its parent element using provided methods.\u003c/p\u003e\n"],["\u003cp\u003eThis class facilitates working with external entities referenced within an XML document using Apps Script's XML Service.\u003c/p\u003e\n"]]],["The `EntityRef` represents an XML entity reference node. Key actions include: getting the node's name, parent element, public ID, system ID, and the text value of its children. It also allows detaching from its parent. You can set the node's name, public ID, and system ID. If the node doesn't have a parent, public ID, or system ID, methods will return null or have no effect.\n"],null,["EntityRef\n\nA representation of an XML `Entity``Reference` node. \n\nMethods\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| [getName()](#getName()) | `String` | Gets the name of the `Entity``Reference` 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| [getPublicId()](#getPublicId()) | `String` | Gets the public ID of the `Entity``Reference` node. |\n| [getSystemId()](#getSystemId()) | `String` | Gets the system ID of the `Entity``Reference` 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| [setName(name)](#setName(String)) | [EntityRef](#) | Sets the name of the `Entity``Reference` node. |\n| [setPublicId(id)](#setPublicId(String)) | [EntityRef](#) | Sets the public ID of the `Entity``Reference` node. |\n| [setSystemId(id)](#setSystemId(String)) | [EntityRef](#) | Sets the system ID of the `Entity``Reference` node. |\n\nDetailed documentation \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](/apps-script/reference/xml-service/content) --- the detached node\n\n*** ** * ** ***\n\n`get``Name()` \nGets the name of the `Entity``Reference` node.\n\nReturn\n\n\n`String` --- the name of the `Entity``Reference` 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``Public``Id()` \nGets the public ID of the `Entity``Reference` node. If the node does not have a public ID,\nthis method returns `null`.\n\nReturn\n\n\n`String` --- the public ID of the `Entity``Reference` node, or `null` if it has none\n\n*** ** * ** ***\n\n`get``System``Id()` \nGets the system ID of the `Entity``Reference` node. If the node does not have a system ID,\nthis method returns `null`.\n\nReturn\n\n\n`String` --- the system ID of the `Entity``Reference` node, or `null` if it has none\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\n\n*** ** * ** ***\n\n`set``Name(name)` \nSets the name of the `Entity``Reference` node.\n\nParameters\n\n| Name | Type | Description |\n|--------|----------|-----------------|\n| `name` | `String` | the name to set |\n\nReturn\n\n\n[EntityRef](#) --- the `Entity``Reference` node, for chaining\n\n*** ** * ** ***\n\n`set``Public``Id(id)` \nSets the public ID of the `Entity``Reference` node.\n\nParameters\n\n| Name | Type | Description |\n|------|----------|----------------------|\n| `id` | `String` | the public ID to set |\n\nReturn\n\n\n[EntityRef](#) --- the `Entity``Reference` node, for chaining\n\n*** ** * ** ***\n\n`set``System``Id(id)` \nSets the system ID of the `Entity``Reference` node.\n\nParameters\n\n| Name | Type | Description |\n|------|----------|----------------------|\n| `id` | `String` | the system ID to set |\n\nReturn\n\n\n[EntityRef](#) --- the `Entity``Reference` node, for chaining"]]