Encoding is used to escape blocks of text containing characters which would otherwise be recognized as markup. You can encode using the hexidecimal character representation or using CDATA (a feature of xml version 1.0). Below are some examples:
|
Encoding HTML Tags:
<description>this is <b>bold</b></description>
Result: this is bold
|
|
Encoding HTML within a CDATA Section:
<description><![CDATA[this is <b>bold</b>]]></description>
Result: this is bold
|
|
Encoding angle brackets in text:
<description>5 &lt; 8, ticker symbol&lt;RSS&gt;</description>
Result: 5 < 8, ticker symbol <RSS>
|
|
Encoding angle brackets in text within a CDATA section:
<description><![CDATA[5 < 8, ticker symbol <RSS>]]></description>
Result: 5 < 8, ticker symbol <RSS>
|
Encoding
|
Presentation
|
|
<title>AT&T</title>
|
AT&T
|
|
<title>Bill & Ted's Excellent Adventure</title>
|
Bill & Ted's Excellent Adventure
|
|
<title>The &amp; entity</title>
|
The & entity
|
|
<title>I <3 RSS</title>
|
I <3 RSS
|
|
<title>A < B</title>
|
A < B
|
|
<title>A<B</title>
|
A<B
|
|
<title>Nice <gorilla> what's he weigh?</title>
|
Nice <gorilla>, what's he weigh?
|
Comments (0)
You don't have permission to comment on this page.