XML Using CDATA for Dealing with HTML Tags
In an XML file, if an element contains HTML tags, it could cause problem because
HTML tags have the similar format as XML tags. For example, "<table>",
"<b>". By putting text inside a CDATA section, the HTML tags
will be ignored by the parser.
A CDATA section starts with "<![CDATA[" and ends with "]]>".
For example:
<title>
<![CDATA[<h2>Welcome to www.SelectaGPS.com</h2>]]>
</title>
By this way, the parser will know "<title>" is an element tag
of the XML file, but "<h2>" is not an XML element tag.
|