public interface EntityReference extends Node
EntityReference节点可用于表示树中的实体引用。
请注意,字符引用和对预定义实体的引用被认为是由HTML或XML处理器进行扩展,以便字符由Unicode等效而不是由实体引用表示。
此外,XML处理器可以在构建Document时完全扩展对实体的Document ,而不是提供EntityReference节点。
如果它不提供这样的节点,则对于EntityReference节点表示为已知实体的参考Entity存在,并且子树EntityReference节点是副本Entity节点子树。
但是,当实体包含未绑定的命名空间前缀时,后者可能不正确。
在这种情况下,由于命名空间前缀解析取决于实体引用的位置, EntityReference节点的EntityReference可能会绑定到不同的命名空间URI。
当一个EntityReference节点表示对未知实体的引用时,节点没有子节点,例如Attr.value使用时,其替换值为空。
对于Entity节点, EntityReference节点及其所有后代都是只读的。
注意: EntityReference节点可能会导致元素内容和属性值归一化问题,例如在XML 1.0和XML Schema中,在实体引用扩展后执行归一化。
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_NODEappendChild, 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 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.