public interface Entity extends Node
的nodeName
属性继承自Node
包含实体的名称。
一个XML处理器可以选择完全扩展实体在结构模型是通过DOM;在这种情况下会出现在文档树中的节点没有EntityReference
。
XML不强制要求一个非验证的XML处理器读取和处理在外部子集或参数实体中声明的实体声明。这意味着在外部子集中声明的已解析实体不需要被某些应用程序扩展,而实体的替换文本可能不可用。当 replacement text是可用的,相应的Entity
节点的子列表示重置价值结构。否则,子列表是空的。
DOM级别3不支持编辑Entity
节点;如果用户想要改变一个Entity
内容,各相关EntityReference
节点必须在结构模型的Entity
内容克隆人取代,然后期望的变化必须对克隆代替。Entity
节点和他们的后代是只读的。
一个Entity
节点没有父。
注:如果实体包含一个未绑定的命名空间前缀,在Entity
节点子树结点对应的namespaceURI
是null
。同样的EntityReference
节点参考这个实体是真实的,当他们使用的Document
接口createEntityReference
方法创建。
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Modifier and Type | Method and Description |
---|---|
String |
getInputEncoding()
当解析时,当它是一个外部解析实体时,指定用于该实体的编码的属性。
|
String |
getNotationName()
未分析实体,该实体的符号的名称。
|
String |
getPublicId()
公共标识符的实体如果指定有关,和
null 否则。
|
String |
getSystemId()
如果指定的实体关联的标识系统,并
null 否则。
|
String |
getXmlEncoding()
属性指定,作为文本声明的一部分,这个实体的编码,当它是一个外部分析的实体。
|
String |
getXmlVersion()
属性指定,作为文本声明的一部分,这个实体的版本号,当它是一个外部解析实体时。
|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
String getPublicId()
null
否则。
String getSystemId()
null
否则。这可能是一个绝对的URI或不。
String getNotationName()
null
。
String getInputEncoding()
null
如果一个实体从内部子集或如果它是不知道的。
String getXmlEncoding()
null
否则。
String getXmlVersion()
null
否则。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.