Entity


Entity org.w3c.dom

Java 1.4

This interface represents an entity defined in an XML DTD. The name of the entity is specified by the getNodeName( ) method inherited from the Node interface. The entity content is represented by the child nodes of the Entity node. The methods defined by this interface return the public identifier and system identifier for external entities, and the notation name for unparsed entities. Note that Entity nodes and their children are not part of the document tree (and the getParentNode( ) method of an Entity always returns null ). Instead a document may contain one or more references to an entity: see the EntityReference interface.

Entities are defined in the DTD (document type definition) of a document, either as part of an external DTD file, or as part of an "internal subset" that defines local entities that are specific to the current document. The DocumentType interface has a getEntities( ) method that returns a NamedNodeMap mapping entity names to Entity nodes. This is the only way to obtain an Entity object: because they are part of the DTD, Entity nodes never appear within the document tree itself. Entity nodes and all descendants of an Entity node are read-only and cannot be edited or modified in any way.

Figure 21-10. org.w3c.dom.Entity

 public interface  Entity  extends Node {  // Public Instance Methods   5.0  String  getInputEncoding  ( );        String  getNotationName  ( );        String  getPublicId  ( );        String  getSystemId  ( );  5.0  String  getXmlEncoding  ( );  5.0  String  getXmlVersion  ( );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net