Entity : Node

Represents an entity in an XML Document Type Definition (DTD).

Browser/User Agent Support

IEMozillaNetscapeOperaSafariNetscapte
no1.0+6.0+nonono

Constructors

ConstructorIEMozillaNetscapeOperaSafariNetscapte
Represents an entity in an XML Document Type Definition (DTD).
no1.0+6.0+nonono
 

Properties

PropertyIEMozillaNetscapeOperaSafariNetscapte
Notation name for an unparsed entity.
no1.0+6.0+nonono
 
Public identifier for this entity, if specified
no1.0+6.0+nonono
 
System identifier for this entity, if specified
no1.0+6.0+nonono
 

Remarks

This object represents an entity from a Document Type Declaration (DTD). Entities are declarations of abbreviated text or other nodes within an XML document. These can then be inserted at various places in an XML document with EntityReference objects.

While the entity name is stored in the Node.nodeName property, the rest of the entity's data (the actual content of the entity) is stored as children of this object (in the Node.childNodes property). The Node.parentNode for Entity nodes will always be null.

Entity objects are read-only and cannot be modified once they are added to the document or after a document is loaded. If you need to change an entity's contents you should create a new one and change all the EntityReference nodes that referred to the old entity to refer to the new one instead.

References

DocumentType | EntityReference | Notation

Availability

HTML DOM Level 2 | W3C

Constructor Detail

Entity Entity()

Represents an entity in an XML Document Type Definition (DTD).

Visibility
internal

Property Detail

String notationName - read only

Notation name for an unparsed entity.

Remarks
If this entity is unparsed, notationName contains the notation name of the entity notation. notationName is null for parsed entities.
Availability

HTML DOM Level 2 | W3C

String publicId - read only

Public identifier for this entity, if specified

Remarks
If this entity was defined with a public identifier, then this property will contain that value, otherwise it will return null.
Availability

HTML DOM Level 2 | W3C

String systemId - read only

System identifier for this entity, if specified

Remarks
If this entity was defined with a system identifier, then this property will contain that value, otherwise it will return null.
Availability

HTML DOM Level 2 | W3C