How To: Use escape characters for &, ", ', <, and > in XML


Certain characters cannot be used within XML because they have special meanings. These characters have to be escaped with the following predefined entities. To use one of the characters listed below, substitute it with the appropriate string.


Follow the steps below.

ampersand (&) is escaped to &amp;
double quotes (") are escaped to &quot;
single quotes (') are escaped to &apos;
less than (<) is escaped to &lt;
greater than (>) is escaped to &gt;

Related Information