Characters can be escaped in XML using entity references and character references, or CDATA sections.
XML pre-defines five entities:
Named entity | Replacement text |
---|---|
amp | & |
quot | " |
apos | ' |
lt | < |
gt | > |
Consuming applications will not know whether each character has been escaped or not, and how.