The reason behind this is that XML has five special characters which have a special treatment by the XML parser:
• < the start of a tag.
• > the end of a tag.
• “ the start and end of an attribute value.
• ' the alternative start and end of an attribute value.
• & the start of an entity (which ends with ;).
For example the following block of code would result in an exception thrown by the XML parser:
In order to fix that problem you would need to escape all the XML special characters which would result in the following code:
1. CDATA Block.
Your code would look like this:
• Predefined entities in XML: