
XML has many types of entities, classified according to three criteria:
general or parameter entities, internal or external entities, and parsed or
unparsed entities.
General and Parameter Entities
General entity references can appear anywhere in text or markup. In prac-
tice, general entities are often used as macros, or shorthand for a piece of
text. External general entities can reference images, sound, and other docu-
ments in non-XML format. Listing 3.10 shows how to use a general entity
to replace some text.
Listing 3.10: General Entity
<?xml version=”1.0”?>
<!DOCTYPE address-book [
<!ENTITY jacksmith
‘<entry>
<name><fname>Jack</fname><lname>Smith</lname></name> ...