SitePoint Sponsor

User Tag List

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

    Html in RSS description

    I have a class that generates our RSS feed but it''s not parsing HTML in my reader whereas I've seen other feeds that do parse html. I've checked their code and am not seeing what I'm doing wrong. I was wondering if anyone could provide any assistance

    Code:
    	<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'> 
    		<channel> 
    			<atom:link href='http://gamer-source.com/feed/new-rss.xml' rel='self' type='application/rss+xml' /> 
    			<title>Gamer-Source News</title> 
    			<copyright>Copyright (c) 2009 Spire Inc. All rights reserved.</copyright> 
    			<link>http://www.gamer-source.com</link> 
    			<description>News on the latest Blizzard titles</description> 
    			<lastBuildDate>Thu, 04 Jun 2009 05:37:17 -0500</lastBuildDate> 
    			<language>en-us</language> 
    			<image> 
    				<url>http://www.gamer-source.com/image/branding/rss-logo.jpg</url> 
    				<width>50</width> 
    				<height>50</height> 
    				<title>Gamer-Source News</title> 
    				<link>http://www.gamer-source.com</link> 
    			</image> 
    		<item> 
    			<title><![CDATA[Mike Morhaime Confirms Battle.net 2.0 is Free]]></title> 
    			<link>http://www.gamer-source.com/index.php?cmd=article&amp;sec=news&amp;act=view&amp;id=93</link> 
    			<description><![CDATA[><p>With World of Warcraft being such a successful title and opening so many more doors for Blizzard with the major increase in revenue, a lot of gamers have been concerned whether Battle.net would become a subscription-based service or not.  At last year's Blizzcon Rob Pardo touched on this by stating that "We would never do something like say to get the full game experience, you'll have to pay extra".  But that wasn't much help considering World of Warcraft is subscription based. Now he has confirmed that a player who buys Starcraft 2 retail will not be paying any subscription fees for Bnet 2.0.</p> 
     
    <div class='quote-left'><div class='quote-right'><div class='quote-content'><h5>Mike Morhaime<sup><a class='ref-link' href='#ref--1'>(1)</a></sup></h5>what I will say is that a player who goes to retail and buys the Starcraft 2 box at retail will have the full Starcraft 2 game included in the box and they will have the ability to play on battlenet with no additional fee.</div></div></div><div class='news-ref'><h4>Sources</h4><ol class='news-list-ref'><li><a name='ref--1'/><a href='http://www.gamer-source.com/image/6-4/mike5-31.wav' target='_blank'>Conference Call</a></li></ol><div class='clear'></div></div>]]></description> 
    			<author>news@gamer-source.com (News Team)</author> 
    			<guid>http://www.gamer-source.com/index.php?cmd=article&amp;sec=news&amp;act=view&amp;id=93</guid> 
    			<pubDate>Thu, 04 Jun 2009 04:47:28 -0500</pubDate> 
    			<category>Blizzard News</category> 
    		</item> 
    		</channel> 
    	</rss>

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Is your class using string concatenation or whatever platform's XML library? You should be using the latter and this won't be a problem.

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not using PHP's xml library. I don't want to rely on PHP to keep up with standards so I can maintain flexibility.

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I really don't see how simple XML writing is going to change much in PHP. If something like that does change in a breaking manner, you probably have alot of bigger fish to fry.

    Key thing here is XML documents might be expressed as text but they are really a graph of xml nodes and you are much better manipulating it as a graph of objects not a text stream.

  5. #5
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not concerned with manipulation only generation.

  6. #6
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,624
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Creation is the highest form of manipulation. PHP has an Xml object. Use it.

  7. #7
    SitePoint Guru
    Join Date
    Sep 2004
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If anyone knows how to set it up so it will read HTML please let me know.


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
  •