<!--Within this comment I can use ]]>and other reserved characters like <&, ', and ", but %MyParamEntity; will not be expanded(if I retrieve the text of this node it will contain%MyParamEntity; and not "Has been expanded")and I can't place two dashes next to each other.-->
<![CDATA[Within this Character Data block I canuse double dashes as much as I want (along with <, &, ', and ")*and* %MyParamEntity; will be expanded to the text"Has been expanded" ... however, I can't usethe CEND sequence. If I need to use CEND I must escape one of thebrackets or the greater-than sign using concatenated CDATA sections.]]>
<description>An example of escaped CENDs</description><!-- This text contains a CEND ]]> --><!-- In this first case we put the ]] at the end of the first CDATA blockand the > in the second CDATA block --><data><![CDATA[This text contains a CEND ]]]]><![CDATA[>]]></data><!-- In this second case we put a ] at the end of the first CDATA blockand the ]> in the second CDATA block --><alternative><![CDATA[This text contains a CEND ]]]><![CDATA[]>]]></alternative>
<exampleOfAComment><!--Since this is a commentI can use all sorts of reserved characterslike > < " and &or write things like<foo></bar>but my document is still well-formed!--></exampleOfAComment>
…但它仍然是文件的一部分:
<exampleOfACDATA><![CDATA[Since this is a CDATA sectionI can use all sorts of reserved characterslike > < " and &or write things like<foo></bar>but my document is still well formed!]]></exampleOfACDATA>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" ><head><title>CDATA Example</title></head><body>
<h2>Using a Comment</h2><div id="commentExample"><!--You won't see this in the documentand can use reserved characters like< > & "--></div>
<h2>Using a CDATA Section</h2><div id="cdataExample"><![CDATA[You will see this in the documentand can use reserved characters like< > & "]]></div>
</body></html>
<item><title>Title of Feed Item</title><link>/mylink/article1</link><description><![CDATA[<p><a href="/mylink/article1"><img style="float: left; margin-right: 5px;" height="80" src="/mylink/image" alt=""/></a>Author Names<br/><em>Date</em><br/>Paragraph of text describing the article to be displayed</p>]]></description></item>