XML entity is a mechanism for defining an alias to an item used in the XML document or the document type definition (DTD).