Predefined Entities in XML
The XML specification does not use the term "character entity" or "character entity reference". The XML specification defines five "predefined entities" representing special characters, and requires that all XML processors honor them. The entities can be explicitly declared in a DTD, as well, but if this is done, the replacement text must be the same as the built-in definitions. XML also allows other named entities of any size to be defined on a per-document basis.
The table below lists the five XML predefined entities. The "Name" column mentions the entity's name. The "Character" column shows the character. To render the character, the format &name;
is used; for example, &
renders as &. The "Unicode code point" column cites the character via standard UCS/Unicode "U+" notation, which shows the character's code point in hexadecimal. The decimal equivalent of the code point is then shown in parentheses. The "Standard" column indicates the first version of XML that includes the entity. The "Description" column cites the character via its canonical UCS/Unicode name, in English.
Name | Character | Unicode code point (decimal) | Standard | Description |
---|---|---|---|---|
quot | " | U+0022 (34) | XML 1.0 | double quotation mark |
amp | & | U+0026 (38) | XML 1.0 | ampersand |
apos | ' | U+0027 (39) | XML 1.0 | apostrophe (= apostrophe-quote) |
lt | < | U+003C (60) | XML 1.0 | less-than sign |
gt | > | U+003E (62) | XML 1.0 | greater-than sign |
Read more about this topic: List Of XML And HTML Character Entity References
Famous quotes containing the word entities:
“What are you now? If we could touch one another,
if these our separate entities could come to grips,
clenched like a Chinese puzzle . . . yesterday
I stood in a crowded street that was live with people,
and no one spoke a word, and the morning shone.
Everyone silent, moving. . . . Take my hand. Speak to me.”
—Muriel Rukeyser (19131980)