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:
“The variables of quantification, something, nothing, everything, range over our whole ontology, whatever it may be; and we are convicted of a particular ontological presupposition if, and only if, the alleged presuppositum has to be reckoned among the entities over which our variables range in order to render one of our affirmations true.”
—Willard Van Orman Quine (b. 1908)