SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Thread: RSS CData Item

  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RSS CData Item

    I have been unsuccessful for the past hour to pass validation tests with my RSS feed. Different sources keep saying a bunch of different things.

    <description>[CDATA[ This is the description. ]]</description>

    <![CDATA[<description> This is the description. </description>]]>

    What can I do? The validator is flagging the = in the image link provided in the main post for the feed.

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's your feed code look like?

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here:

    Code:
    <?xml version='1.0' encoding='utf-8'?> 
     <rss version='2.0'> 
      <channel> 
      <title>http://www.gamer-source.com</title> 
      <link>http://www.gamer-source.com</link> 
      <![CDATA[<description>All the latest news on Blizzard games</description> 
      <lastBuildDate>Mon, 08 Sep 2008 08:45:02 -0500</lastBuildDate> 
      <language>en-us</language> 
      <item> 
       <title>more fake news</title> 
       <link>http://www.gamer-source.com/news/214</link> 
       <description>SCII was released yesterday</description> 
       <guid>http://www.gamer-source.com/news/214</guid> 
      </item> 
      <item> 
       <title>Testing</title> 
       <link>http://www.gamer-source.com/news/210</link> 
       <description>lalalala 
     
     
    http://www.starcraft-source.com/</description> 
       <guid>http://www.gamer-source.com/news/210</guid> 
      </item> 
      <item> 
       <title>This is a test Video</title> 
       <link>http://www.gamer-source.com/news/213</link> 
       <description><b>This is a video test</b> 
     
    <embed src="http://services.brightcove.com/services/viewer/federated_f8/1704140479" bgcolor="#FFFFFF" flashvars="videoId=1745164973&amp;playerId=1704140479&amp;viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&amp;servicesURL=http://services.brightcove.com/services&amp;cdnURL=http://admin.brightcove.com&amp;domain=embed&amp;autoStart=false&amp;" base="http://admin.brightcove.com" name="flashObj" seamlesstabbing="false" type="application/x-shockwave-flash" swliveconnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="486" height="412"> 
     
    <img src='http://www.starcraft-source.com/images/template/logo.gif' border=0/></description> 
       <guid>http://www.gamer-source.com/news/213</guid> 
      </item> 
      <item> 
       <title>This is a test Video</title> 
       <link>http://www.gamer-source.com/news/212</link> 
       <description><b>This is a video test</b> 
     
    <embed src="http://services.brightcove.com/services/viewer/federated_f8/1704140479" bgcolor="#FFFFFF" flashVars="videoId=1745164973&playerId=1704140479&viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&servicesURL=http://services.brightcove.com/services&cdnURL=http://admin.brightcove.com&domain=embed&autoStart=false&" base="http://admin.brightcove.com" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></description> 
       <guid>http://www.gamer-source.com/news/212</guid> 
      </item> 
      <item> 
       <title>A video</title> 
       <link>http://www.gamer-source.com/news/211</link> 
       <description>Here is a video!</description> 
       <guid>http://www.gamer-source.com/news/211</guid> 
      </item> 
      </channel> 
     </rss>
    I've tried doing CDATA multiple ways and it won't work on any of them. Also, is there a way in the link tag to do a proper URL with .php?cmd=article&id=5 without it breaking validation? Or does the validation even matter that much?

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try encoding the ampersands (all of them). That should fix it. (I noticed some of them are literal, rather than encoded.)

  5. #5
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean in the description for each item? In the link tag? Or both?

  6. #6
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both. Just to be on the safe side.

  7. #7
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll give it a shot.

  8. #8
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm now getting these errors. One of which appears to not be in english: http://www.validome.org/rss-atom/val.../www.gamer-sou
    rce.com/feed/news.xml&version=rss_2_0

  9. #9
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  10. #10
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any thoughts?

  11. #11
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://validator.w3.org/feed/check.c...eed%2Fnews.xml

    I only trust the http://validator.w3.org/feed/ service. That'll tell you what needs to be fixed.

  12. #12
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://validator.w3.org/feed/check.c...eed%2Fnews.xml

    It appears the list tags are not recognized. Should RSS feeds not contain any HTML? Or only limited tags? Is there a good rSS resource? I keep finding outdated and/or crappy resources.

  13. #13
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is really my first time ensuring that an RSS feed works. I'm writing a class which will parse everything for me as it needs to be. So any tips woul dbe great. I do appreciate the help you've already provided.


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
  •