-
SubItems Allowed ?
Hi
Im trying to make a RSS feed. But it needs sub items - is that allowed ?
Code:
<item>
<title></title>
<item>
<title></title>
<description></description>
</item>
<item>
<title></title>
<description></description>
</item>
<item>
<title></title>
<description></description>
</item>
<description></description>
</item>
Will RSS Reader interpret this ?
Thanks
-
Might depend on RSS version, but general concensis is no.
According to the RSS 2.0 Spec you cannot. And that's the spec I'd trust. sub-items just don't make sense anyway.
-
Ok. What about html tags in between <description></description> so that I can have a good look when seen in a RSS Reader ? Like
Code:
<description>
<b>2 points</b><br/>
This is Sentense1<br/>
This is Sentense2<br/>
This is Sentense3<br/>
</description>
Any alternative for this ?
-
My RSS reader displays elements with <br /> in them just fine. However, you should know that your xml will not validate with that in it. Better to use the ISO character set for the < and > symbols; i.e., & lt; and & gt; respectively (without the space between each).
-
You just need to use CDATA:
Code:
<description>
<![CDATA[
<ul>
<li>Number one</li>
<li>Number two</li>
</ul>
]]>
</description>