Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Cdata
Eine Darstellung eines XML-CDATASection-Knotens.
// Create and log an XML document that shows how special characters like '<',// '>', and '&' are stored in a CDATASection node as compared to in a Text node.constillegalCharacters='<em>The Amazing Adventures of Kavalier & Clay</em>';constcdata=XmlService.createCdata(illegalCharacters);consttext=XmlService.createText(illegalCharacters);constroot=XmlService.createElement('root').addContent(cdata).addContent(text);constdocument=XmlService.createDocument(root);constxml=XmlService.getPrettyFormat().format(document);Logger.log(xml);
Ruft den Textwert aller Knoten ab, die direkte oder indirekte untergeordnete Elemente des Knotens sind, in der Reihenfolge, in der sie im Dokument erscheinen.
Der Knoten wird von seinem übergeordneten Knoten Element getrennt. Wenn der Knoten kein übergeordnetes Element hat, hat diese Methode keine Auswirkungen.
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.
[[["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: 2024-12-22 (UTC)."],[[["`Cdata` represents an XML `CDATASection` node, allowing you to store special characters like '\u003c', '\u003e', and '&' literally without escaping them."],["It provides methods to manipulate the CDATA content, such as appending text, detaching from the parent element, and retrieving or setting the text value."],["You can create a `Cdata` node using `XmlService.createCdata(text)` and incorporate it into your XML document."],["`Cdata` is particularly useful when dealing with data that contains characters that would otherwise be interpreted as XML markup."],["It offers flexibility in managing the CDATA content within the XML structure through various methods like `append`, `detach`, `getText`, `getValue`, and `setText`."]]],["The document describes an XML `CDATASection` node and its methods. Key actions include creating a `CDATASection` with special characters, contrasting it with a `Text` node, and logging the results. Methods allow appending text, detaching from a parent, getting the parent element, retrieving text value, accessing the value of child nodes, and setting text. These functions enable manipulation and retrieval of the `CDATASection` node's content and structure within an XML document.\n"]]