Class EntityRef
EntityRef
XML EntityReference
节点的表示形式。
详细文档
getName()
获取 EntityReference
节点的名称。
返回
String
- EntityReference
节点的名称
getPublicId()
获取 EntityReference
节点的公开 ID。如果节点没有公开 ID,此方法会返回 null
。
返回
String
- EntityReference
节点的公开 ID,如果没有,则为 null
getSystemId()
获取 EntityReference
节点的系统 ID。如果节点没有系统 ID,此方法会返回 null
。
返回
String
- EntityReference
节点的系统 ID,如果没有,则为 null
getValue()
获取节点的直接或间接子节点的所有文本值,按文档中显示的顺序。
返回
String
- 节点的直接或间接子节点的所有文本值
setName(name)
设置 EntityReference
节点的名称。
参数
返回
EntityRef
- EntityReference
节点,用于链式调用
setPublicId(id)
设置 EntityReference
节点的公开 ID。
参数
返回
EntityRef
- EntityReference
节点,用于链式调用
setSystemId(id)
设置 EntityReference
节点的系统 ID。
参数
返回
EntityRef
- EntityReference
节点,用于链式调用
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-03。
[null,null,["最后更新时间 (UTC):2024-12-03。"],[[["`EntityRef` represents an XML `EntityReference` node, providing methods to interact with and modify it within a document."],["It offers methods to get and set the name, public ID, and system ID of the entity reference."],["You can detach the node from its parent, retrieve its text value, and access its parent element using provided methods."],["This class facilitates working with external entities referenced within an XML document using Apps Script's XML Service."]]],["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"]]