Enum ContentType
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
内容类型
表示 XML 内容节点类型的枚举。
如需调用枚举,您可以调用其父类、名称和属性。例如
XmlService.ContentType.CDATA
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eContentType\u003c/code\u003e is an enumeration used to represent the types of XML content nodes in Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eThe available \u003ccode\u003eContentType\u003c/code\u003e properties 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, each representing a different type of XML node.\u003c/p\u003e\n"],["\u003cp\u003eTo use a ContentType property, call its parent class, name, and the specific property, such as \u003ccode\u003eXmlService.ContentType.CDATA\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enum ContentType\n\nContentType\n\nAn enumeration representing the types of XML content nodes.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nXmlService.ContentType.CDATA`. \n\n### Properties\n\n| Property | Type | Description |\n|-------------------------|--------|-------------------------------------------------------------------------------------------------|\n| `CDATA` | `Enum` | An XML [CDATASection](/apps-script/reference/xml-service/cdata) node. |\n| `COMMENT` | `Enum` | An XML [Comment](/apps-script/reference/xml-service/comment) node. |\n| `DOCTYPE` | `Enum` | An XML [DocumentType](/apps-script/reference/xml-service/doc-type) node. |\n| `ELEMENT` | `Enum` | An XML [Element](/apps-script/reference/xml-service/element) node. |\n| `ENTITYREF` | `Enum` | An XML [EntityReference](/apps-script/reference/xml-service/entity-ref) node. |\n| `PROCESSINGINSTRUCTION` | `Enum` | An XML [ProcessingInstruction](/apps-script/reference/xml-service/processing-instruction) node. |\n| `TEXT` | `Enum` | An XML [Text](/apps-script/reference/xml-service/text) node. |"]]