SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Anjanesh

  2. #2
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Studio Rockstar's Blog - A journey to quitting the dayjob.

  3. #3
    SitePoint Evangelist anjanesh's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 ?
    Anjanesh

  4. #4
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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).
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  5. #5
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You just need to use CDATA:

    Code:
    <description>
    <![CDATA[
    <ul>
    <li>Number one</li>
    <li>Number two</li>
    </ul>
    ]]>
    </description>
    Studio Rockstar's Blog - A journey to quitting the dayjob.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •