entities (W3C DOM Core property)
entities collection is a is an unordered
list of the general entities declared in the DTD. Both external and
internal entities should be included; duplicates should be discarded.
This collection is a
intended to be accessed by name. It's also possible to access the items by
their index in the map, however the DOM does not specify what order they
As with all named node maps,
entities is a live
collection, which means that changes to the collection it represents are
immediately reflected in the node map (as opposed to it being a static
Each member of this collection is an
Entity node, and is readonly.
Even though a collection looks like an array, it isn't an array —
although you can iterate through it and refer to its members like an
array, you can't use
Array methods like
pop on it.
This collection is very sparsely supported, but there's no other way to retrieve this data. Just gotta hope you never need to!
Only Opera in XHTML mode or
XML1 and Internet
Explorer in XML provide data for the
entities collection; in
Firefox, Safari 3
and Safari 1.3 and 2 in XHTML mode or XML the
null; in other environments the
doctype itself is
DocumentType for details).
Internet Explorer in XML this collection only
includes internal entities (those defined in a doctype's internal subset),
external entities are not included. Furthermore it doesn't support
associative array syntax for retrieving members by name (eg.
entities['hawk']), it only supports reference by index
entities) or using the
getNamedItem method of
1 On XHTML pages served as