views:

25763

answers:

2

Where can I get a list of the XML document escape characters?

+40  A: 

There are only five:

"   "
'   '
<   &lt;
>   &gt;
&   &amp;

They're easy to remember. HTML has its own set of escape codes which cover a lot more characters.

Welbog
5 according to wiki...
Mitch Wheat
Damned `apos`. I forget it since I never use it.
Welbog
The ultimate source: http://www.w3.org/TR/xml/#syntax
MicSim
+15  A: 

Perhaps this will help:

List of XML and HTML character entity references:

In SGML, HTML and XML documents, the logical constructs known as character data and attribute values consist of sequences of characters, in which each character can manifest directly (representing itself), or can be represented by a series of characters called a character reference, of which there are two types: a numeric character reference and a character entity reference. This article lists the character entity references that are valid in HTML and XML documents.

That article lists the following five predefined XML entities:

quot "
amp &
apos '
lt <
gt >

Andrew Hare