We take pride in your success. We let our positivity drive us, day in and out. Talk to us at Mindfire to know us more.

Software Technology Tips

Most of us are aware of how to escape characters in HTML, so that the browser doesn't process them but still then we do come across instances where characters we have provided in the content is actually treated as code by the browsers. This is especially true when you are working with XML or XHTML ( for instance, your application is generating an XML file).

In XML there are five characters entity references ( greater than >, less than <, ampersand &,quotation and apostrophe ) that need to be escaped or the browser/parser doesn't treat them as markup.  In these instances you must use entity escape code rather than the characters.

Ampersand      &     &amp;
Greater Than   >     &gt;
Less Than      <     &lt;
Quotation      "     &quot;
Apostrophe     '     &apos;

For a list of escape codes for XHTML please check this http://www.escapecodes.info/
 
Please note, the idea behind this tip was not to demonstrate the technique as much as it was to associate the concept  "Entity Escape" with it.


Related Tags:

Entity, HTML, XML, XHTML

Author: Danish Ahmed

top

Web Development

Let us Connect!

privacy

copyright (c) Mindfire Solutions 2007-2012. Login