Escape From XML

If you want to use a greater than sign (>) in an XML document you need to escape it. I once had to meticulously look over a 120 MB xml file that was generating a parsing exception, the cause of the exception, a greater than sign. Escape the following characters they are intended as xml/html content.

<	&#60;
> 	&#62;
& 	&#38;

Let me also mention some common characters that I escape when working with HTML.

&#169;     &copy;     Copyright
&#160;     &nbsp;     Space
&#60;      &lt;       <
&#62;      &gt;       >
&#38;      &amp;      &