<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kazzi.NET &#187; html</title>
	<atom:link href="http://kazzi.net/tag/html/feed" rel="self" type="application/rss+xml" />
	<link>http://kazzi.net</link>
	<description>A short and boring log site.</description>
	<lastBuildDate>Mon, 12 Sep 2011 02:31:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>CDATA and XHTML Validation</title>
		<link>http://kazzi.net/coding/cdata-and-xhtml-validation.html</link>
		<comments>http://kazzi.net/coding/cdata-and-xhtml-validation.html#comments</comments>
		<pubDate>Thu, 19 Apr 2007 08:16:51 +0000</pubDate>
		<dc:creator>slump</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[cdata]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://kazzi.net/tips-tricks/cdata-and-xhtml-validation.html</guid>
		<description><![CDATA[Recently I had to deal with some validation issues. When your code can not be validated due to some strange characters, or whatever things have to be there, we use CDATA mark to make it ignored by the parser. The term CDATA (/ˈsi.deɪ.tə/), meaning character data, is used for distinct, but related purposes in the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to deal with some validation issues. When your code can not be validated due to some strange characters, or whatever things have to be there, we use CDATA mark to make it ignored by the parser.</p>
<p><span id="more-9"></span></p>
<blockquote><p>The term CDATA (/ˈsi.deɪ.tə/), meaning character data, is used for distinct, but related purposes in the markup languages SGML and XML. The term indicates that a certain portion of the document is general character data, rather than non-character data or character data with a more specific, limited structure.)</p></blockquote>
<p><span><a href="http://en.wikipedia.org/wiki/CDATA">http://en.wikipedia.org/wiki/CDATA</a></span></p>
<p>For example, if your JavaScript source contains many characters like the greater than (>), less than (<) etc., you have to put it in CDATA bounds to make it validated.</p>
<pre><code>&lt;script type="text/javascript"&gt;
&lt;![CDATA[
... your code
]]&gt;
&lt;/script&gt;</code></pre>
<p>Some JavaScript compiler will report error on the opening mark &lt;![CDATA[, so just put the double forward slashes in front of them, they will be ignored too. Like this:</p>
<pre><code>&lt;script type="text/javascript"&gt;
//&lt;![CDATA[
... your code
//]]&gt;
&lt;/script&gt;</code></pre>
<p>Fair enough, huh? You can apply the trick with another language or style, like <span class="code">&lt;!&#45;&#45;&lt;![CDATA[&#45;&#45;&gt;</span> and <span class="code">&lt;!&#45;&#45;]]&gt;&#45;&#45;&gt;</span> for HTML, <span class="code">/*&lt;![CDATA[*/</span> and <span class="code">/*]]&gt;*/</span> for CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://kazzi.net/coding/cdata-and-xhtml-validation.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

