XML – Entities

The Document entity is the starting point of XML processor and it is the symbolic representation of information. There are certain rules that both in HTML and XML to not to use few symbols as content or data which requires to indicate them differently.

The Syntax of an entity starts with ampersand (&) then name of the symbol and ending with semicolon.

Syntax:

Examples of few entities:

Entity need to be created in the DTD – Document Type Definition. Once after the creation of the entity in DTD, it can be referenced wherever it is required.

Declaring an entity:

XML example: