Google
 

Wednesday, June 13, 2007

How & in XML?

ref: http://www.w3schools.com/xml/xml_cdata.asp


There are 5 predefined entity references in XML:

&lt; < less than
&gt; > greater than
&amp; & ampersand 
&apos; ' apostrophe
&quot; " quotation mark

Note: Only the characters "<" and "&" are strictly illegal in XML. Apostrophes, quotation marks and greater than signs are legal, but it is a good habit to replace them.

or use the CDATA

Everything inside a CDATA section is ignored by the parser.
A CDATA section starts with "<![CDATA[" and ends with "]]>":

Happy day, happy life!

No comments: