Stay organized with collections Save and categorize content based on your preferences.
ContentA representation of a generic XML node.
Implementing classes Name Brief descriptionCdata
A representation of an XML CDATASection
node. Comment
A representation of an XML Comment
node. DocType
A representation of an XML DocumentType
node. Element
A representation of an XML Element
node. EntityRef
A representation of an XML EntityReference
node. ProcessingInstruction
A representation of an XML ProcessingInstruction
node. Text
A representation of an XML Text
node. Detailed documentation asCdata()
Casts the node as a CDATASection
node for the purposes of autocomplete. If the node's ContentType
is not already CDATA
, this method returns null
.
Cdata
— the CDATASection
node
asDocType()
Casts the node as a DocumentType
node for the purposes of autocomplete. If the node's ContentType
is not already DOCTYPE
, this method returns null
.
DocType
— the DocumentType
node
asElement()
Casts the node as an Element
node for the purposes of autocomplete. If the node's ContentType
is not already ELEMENT
, this method returns null
.
Element
— the Element
node
asEntityRef()
Casts the node as a EntityReference
node for the purposes of autocomplete. If the node's ContentType
is not already ENTITYREF
, this method returns null
.
EntityRef
— the EntityReference
node
asProcessingInstruction()
asText()
Casts the node as a Text
node for the purposes of autocomplete. If the node's ContentType
is not already TEXT
, this method returns null
.
Text
— the Text
node
detach()
Detaches the node from its parent Element
node. If the node does not have a parent, this method has no effect.
Content
— the detached node
getParentElement()
Gets the node's parent Element
node. If the node does not have a parent, this method returns null
.
Element
— the parent Element
node
getType()
Gets the node's content type.
ReturnContentType
— the node's content type
getValue()
Gets the text value of all nodes that are direct or indirect children of the node, in the order they appear in the document.
ReturnString
— the text value of all nodes that are direct or indirect children of the node
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-02 UTC."],[[["`Content` is a generic representation of an XML node in Google Apps Script and provides methods to interact with it."],["It offers various methods to cast the node into specific types like `Element`, `Text`, `Comment`, etc., for easier manipulation."],["You can detach a node from its parent, get its parent element, or retrieve its content type using dedicated methods."],["`getValue()` helps retrieve the combined text value of all the node's children, providing a way to access its content."],["Implementing classes include `Cdata`, `Comment`, `DocType`, `Element`, `EntityRef`, `ProcessingInstruction`, and `Text`, representing different XML node types."]]],["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"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4